public static boolean isHtmlTag(@NotNull XmlTag tag) {
    if (!tag.getLanguage().isKindOf(HTMLLanguage.INSTANCE)) return false;

    XmlDocument doc = PsiTreeUtil.getParentOfType(tag, XmlDocument.class);

    String doctype = null;
    if (doc != null) {
      doctype = XmlUtil.getDtdUri(doc);
    }
    doctype = doctype == null ? ExternalResourceManagerEx.getInstanceEx().getDefaultHtmlDoctype(tag.getProject()) : doctype;
    return XmlUtil.XHTML4_SCHEMA_LOCATION.equals(doctype) ||
           !StringUtil.containsIgnoreCase(doctype, "xhtml");
  }
public static boolean isHtmlTag(@NotNull XmlTag tag)