The list below lists them (the attributes in italics were deprecated between HTML 4 and XHTML 1.0 and should not be used in XHTML. It feels like there are two options on the table, write a more declarative and readable code that works or write a smaller and flexible code that (may) also works and I dont really see any gain in that. Which is your point. "#foo" do not refer to elements with an attribute name="foo"; rather, they refer to elements with an attribute defined to be of type ID, e.g., the id Although a restricted form of SGML, XML nonetheless preserves most of SGML's power and It means you need to explicitly state the attribute and its value. Element and attribute names must be in lower case. } See also translations. File size isnt reduced by any meaningful amount. XML. This page was last modified on Feb 24, 2023 by MDN contributors. This includes XML whitespace handling, CDATA sections, doubling of name attribute values, the case of pre-defined value sets, and hexadecimal entity references: Peeling away from these rules, this looks a lot less like were working with XML, and more like working with HTML. Used to do that a lot back in 2012 because of compatibility issues. Here is an example of an XHTML document. may also be labeled with the Internet Media Type "application/xhtml+xml" as defined in [RFC3236]. Where Im 100% on board is avoiding redundancy with things like disabled="disabled". Must not contain the ,