- From: Jim Jewett <jimjjewett@gmail.com>
- Date: Mon, 17 Nov 2008 18:21:08 -0500
- To: "Ian Hickson" <ian@hixie.ch>
- Cc: "David Woolley" <forums@david-woolley.me.uk>, www-html@w3.org
On Mon, Nov 17, 2008 at 5:38 PM, Ian Hickson <ian@hixie.ch> wrote: > On Mon, 17 Nov 2008, Jim Jewett wrote: >> > Could you elaborate on why you think that it is >> > bad to have tags be omitted? >> I think I dropped this at the time, because I couldn't >> easily explain it except in terms of cleanliness, or >> safety margins. >> But it started bugging me again when I read >> http://www.w3.org/html/wg/markup-spec/ >> Section 3.6 would be much simpler if it didn't have to >> worry about optional and implied tags. >> Section 3.8 would almost disappear. > Why does the size of the spec matter? Because more complicated specs lead to more bugs. http://www.w3.org/html/wg/markup-spec/ was intended to be an informative (not normative) subset of the spec, describing only valid HTML. A smaller, simpler, specification would be easier to meet, and easier to check. > Surely the benefit to authors far, > far outweigh the benefits to the spec community? Not in this case. I see some value (at least for future authors) in a simpler language specification. I see very little value in many of the optionally omitted tags. Are there really very many documents which leave out the body tag, but are otherwise valid? Were any of them intended as HTML, and written by people for whom writing an explicit tag would be an actual burden? >> At the very least, it would be nice to simplify the rules >> regarding when a tag could be omitted. For example: >> """ >> A body element's end tag may be omitted if the body >> element is not immediately followed by a comment >> and the element is either not empty or its start tag >> has not been omitted. >> """ >> Why so much work to avoid moving a comment from >> after the body to inside? > It's not much work, it's a single sentence. It was work for me to read it, and I'm a native English speaker. > It's there so that the markup reflects the syntax. > If we did it the other way around, you'd be > complaining that this: > <body></body><!----> > ...represented a body element containing a comment, > when it obviously doesn't. My point is that it really isn't that important whether a comment is at the very end of the body, or immediately after the body -- and it so it isn't worth a special exception in the element definition. You could solve this by just saying one of the two positions is not valid HTML. Or you could solve it by saying the </body> tag is required. Since browsers are already doing error correction on 95%+ of pages anyhow, that doesn't even need to affect the way pages are viewed. It just simplifies the model of what it takes to be valid. -jJ
Received on Monday, 17 November 2008 23:21:43 UTC