News for hackers. Stuff that matters.
Re:Google HTML/CSS style guide suggests omitting head and bo... by saurik on Tuesday May 21, 2019 @11:35AM (#19971101)
I don't understand: since when are those structure tags optional, and in what browsers and browser versions would this work in?
Re:Google HTML/CSS style guide suggests omitting head and bo... by pdw on Tuesday May 21, 2019 @11:40AM (#19971178)
I 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

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>&#42;wow&#42;</em></p>
Re:Google HTML/CSS style guide suggests omitting head and bo... by gsnedders on Tuesday May 21, 2019 @12:11PM (#19971540)
The very first draft HTML spec, 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).

Re:Google HTML/CSS style guide suggests omitting head and bo... by ntzm on Tuesday May 21, 2019 @11:37AM (#19971128)
The HTML5 specification says where they're optional, so any browser that properly implements the spec
Re:Google HTML/CSS style guide suggests omitting head and bo... by JMTQp8lwXL on Tuesday May 21, 2019 @11:39AM (#19971162)
So I'm supposed to assume a browser properly implements a specification?
Re:Google HTML/CSS style guide suggests omitting head and bo... by jpat1 on Tuesday May 21, 2019 @11:42AM (#19971206)
Yes, 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.
Re:Google HTML/CSS style guide suggests omitting head and bo... by dylan604 on Tuesday May 21, 2019 @11:48AM (#19971284)
Otherwise you end up with a Chrome situation where everyone just develops for a single browser.

You're commented needed to modified for current times. ;-)

Re:Google HTML/CSS style guide suggests omitting head and bo... by ekianjo on Tuesday May 21, 2019 @11:53AM (#19971333)
Chrome is based on Webkit which is free and open source so that is a terrible analogy with IE that was proprietary.
Re:Google HTML/CSS style guide suggests omitting head and bo... by mathieuh on Tuesday May 21, 2019 @12:13PM (#19971570)
Its being open source isn’t mutually exclusive with its not adhering to the standard
Re:Google HTML/CSS style guide suggests omitting head and bo... by judge2020 on Tuesday May 21, 2019 @12:15PM (#19971594)
Chrome 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.
Re:Google HTML/CSS style guide suggests omitting head and bo... by ekianjo on Wednesday May 22, 2019 @08:31AM (#19980417)
Blink is also under a FOSS license so I am not sure what the problem is. Competiting browsers use Blink as well.
Re:Google HTML/CSS style guide suggests omitting head and bo... by jwandborg on Tuesday May 21, 2019 @01:49PM (#19972659)
If it was that simple there would be no reason for Safari to lag behind.
Re:Google HTML/CSS style guide suggests omitting head and bo... by sureaboutthis on Tuesday May 21, 2019 @12:43PM (#19971850)
No 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.
Re:Google HTML/CSS style guide suggests omitting head and bo... by JMTQp8lwXL on Tuesday May 21, 2019 @01:56PM (#19972756)
I 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.

Re:Google HTML/CSS style guide suggests omitting head and bo... by folkrav on Tuesday May 21, 2019 @11:41AM (#19971200)
That's what we do every day we use any browser out there.
Re:Google HTML/CSS style guide suggests omitting head and bo... by gipp on Tuesday May 21, 2019 @11:42AM (#19971207)
Well, that is literally the point of a specification.
Re:Google HTML/CSS style guide suggests omitting head and bo... by JMTQp8lwXL on Tuesday May 21, 2019 @01:58PM (#19972786)
You're missing my point. Assuming that all browsers correctly implement the specification is naive. I don't have an issues with standards themselves existing.
Re:Google HTML/CSS style guide suggests omitting head and bo... by hanniabu on Tuesday May 21, 2019 @11:46AM (#19971265)
Isn't this what you'd be doing in any case?
Re:Google HTML/CSS style guide suggests omitting head and bo... by jchw on Tuesday May 21, 2019 @11:37AM (#19971130)
They 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.
Re:Google HTML/CSS style guide suggests omitting head and bo... by Tomte on Tuesday May 21, 2019 @11:38AM (#19971141)
Since pretty much forever. HTML 4 for sure, probably even earlier.
Re:Google HTML/CSS style guide suggests omitting head and bo... by yoz-y on Tuesday May 21, 2019 @11:41AM (#19971194)
From the slug of this page it seems since 2011? https://www.w3.org/TR/2011/WD-html5-20110525/syntax.html#opt...

Note though that there are some conditions.

Re:Google HTML/CSS style guide suggests omitting head and bo... by snek on Tuesday May 21, 2019 @12:09PM (#19971511)
It's been allowed since long before then, all the way back to the og html 4.01 spec in 1999
Re:Google HTML/CSS style guide suggests omitting head and bo... by gsnedders on Tuesday May 21, 2019 @12:11PM (#19971547)
All the way back to HTML 2.0, which was the first non-draft HTML spec.
Re:Google HTML/CSS style guide suggests omitting head and bo... by yoz-y on Tuesday May 21, 2019 @01:43PM (#19972584)
I see. Today I learnt something new!