3 ms·
HTML is not necessarily case sensitive, you can use upper or lowercase tags in HTML 5, and perhaps others. With that in mind, the tags should be normalized whe
by jeff18 17y ago
HTML is not necessarily case sensitive, you can use upper or lowercase tags in HTML 5, and perhaps others. With that in mind, the tags should be normalized when querying what an element is (hr == HR == hR == Hr). Uppercase was chosen:
http://www.whatwg.org/specs/web-apps/current-work/multipage/apis-in-html-documents.html#apis-in-html-documents http://www.whatwg.org/specs/web-apps/current-work/multipage/...
"These attributes must return element names converted to ASCII uppercase, regardless of the case with which they were created."
- taitems 17y agoWhile it doesn't break a page visually, uppercase HTML tags restrict a page from validating properly?
- jeff18 17y ago"HTML" in this context is meaningless. Are you talking about XHTML, HTML4, HTML5 or what? ;) It depends on the doctype and namespace. In XHTML, an uppercase HR is technically meaningless, since it is case sensitive. In HTML5, it is not case sensitive so hR should be valid, according to the spec. Citation: "In the HTML syntax, tag names, even those for foreign elements, may be written with any mix of lower- and uppercase letters that, when converted to all-lowercase, matches the element's tag name; tag names are case-insensitive."