5 ms·
I don't understand: since when are those structure tags optional, and in what browsers and browser versions would this work in?
by saurik 7y ago
I don't understand: since when are those structure tags optional, and in what browsers and browser versions would this work in?
- ntzm 7y agoThe HTML5 specification says where they're optional, so any browser that properly implements the spec
- JMTQp8lwXL 7y agoSo I'm supposed to assume a browser properly implements a specification?
- folkrav 7y agoThat's what we do every day we use any browser out there.
- jpat1 7y agoYes, that's the point of having a set of standards. Otherwise you end up with an IE situation where everyone just develops for a single browser.
- dylan604 7y agoOtherwise you end up with a Chrome situation where everyone just develops for a single browser. You're commented needed to modified for current times. ;-)
- ekianjo 7y agoChrome is based on Webkit which is free and open source so that is a terrible analogy with IE that was proprietary.
- mathieuh 7y agoIts being open source isn’t mutually exclusive with its not adhering to the standard
- judge2020 7y agoChrome uses its own Blink and V8 now, and there are many cases where developers only design for Chrome and small differences in implementation can be a huge pain in Firefox/Safari.
- ekianjo 7y agoBlink is also under a FOSS license so I am not sure what the problem is. Competiting browsers use Blink as well.
- jwandborg 7y agoIf it was that simple there would be no reason for Safari to lag behind.
- sureaboutthis 7y agoNo professional developer targets a browser when developing a web site unless its a captured audience with no choice. Professional developers follow the specification. Those who do otherwise are only mentioned in reddit headlines and other hobbyist sites.
- JMTQp8lwXL 7y agoI understand that's the intent of standards, but rarely are there not limitations or bugs in implementations. If this was truly the case, we wouldn't need things like Applitools to view our HTML documents in various browsers to scan for differences.
- gipp 7y agoWell, that is literally the point of a specification.
- JMTQp8lwXL 7y agoYou're missing my point. Assuming that all browsers correctly implement the specification is naive. I don't have an issues with standards themselves existing.
- hanniabu 7y agoIsn't this what you'd be doing in any case?
- jchw 7y agoThey are implied. I believe this dates back to when browsers supported non-standard HTML and the behavior of doing it was cemented in HTML5 (like tag soup and so forth.) Since it was based on existing behavior it should work even in old IE, just like the doctype.
- Tomte 7y agoSince pretty much forever. HTML 4 for sure, probably even earlier.
- pdw 7y agoI believe they've been optional in every version of HTML. The example document in the HTML+ spec (1993) did not use them: https://www.w3.org/MarkUp/HTMLPlus/htmlplus_7.html https://www.w3.org/MarkUp/HTMLPlus/htmlplus_7.html The HTML 2.0 spec gives this as its first example: <!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> <title>Parsing Example</title> <p>Some text. <em>*wow*</em></p>
- gsnedders 7y agoThe very first draft HTML spec, https://www.w3.org/MarkUp/draft-ietf-iiir-html-01.txt https://www.w3.org/MarkUp/draft-ietf-iiir-html-01.txt (June 1993), is somewhat interesting here, because the only element with optional start and end tags is the html element (head and body require both start and end tags, per that spec). Certainly by the point of HTML 2.0 (November 1995; the first non-draft spec for HTML) all three elements have start and end tags all optional. The more general ability to omit start/end tags from given elements is a feature of SGML (October 1986), and HTML 2.0 to HTML 4.01 were defined as SGML applications (though approximately nothing ever used an SGML parser for HTML).
- yoz-y 7y agoFrom the slug of this page it seems since 2011? https://www.w3.org/TR/2011/WD-html5-20110525/syntax.html#optional-tags https://www.w3.org/TR/2011/WD-html5-20110525/syntax.html#opt... Note though that there are some conditions.