4 ms·
Which browsers fail to render html if it's missing <html> and <body> tags?
by stonogo 11y ago
Which browsers fail to render html if it's missing <html> and <body> tags?
- pdkl95 11y agoThe existence of Quirks Mode is not an excuse to write sloppy markup.
- stonogo 11y agoThis is not an exercise in moral justification. I'm asking if there are any browsers that fail to render documents without <html> and <body> tags. Do you have an actual answer?
- coldtea 11y agoa) "The Google Style Guide for HTML recommends omitting all optional tags. That includes <html>, <head>, <body>, <p> and <li>" https://google.github.io/styleguide/htmlcssguide.xml#Optional_Tags https://google.github.io/styleguide/htmlcssguide.xml#Optiona... b) HTML5 spec: A body element's start tag may be omitted if the element is empty, or if the first thing inside the body element is not a space character or a comment, except if the first thing inside the body element is a meta, link, script, style, or template element.
- pdkl95 11y ago> Google Style Guide Who cares what google thinks. They are not the w3c. > HTML5 spec It's not an HTML5 document. https://validator.w3.org/check?uri=http%3A%2F%2Fandrewbelt.name%2F&charset=%28detect+automatically%29&doctype=Inline&group=0 https://validator.w3.org/check?uri=http%3A%2F%2Fandrewbelt.n... Even if you want to ignore the required <!DOCTYPE html>, the document is still missing the required <head> with exactly one <title> element.
- coldtea 11y ago>Who cares what google thinks. 90% of the web? >They are not the w3c. W3C? What's this 1999? It's all about the HTML5 group now.