- From: Robert Burns <rob@robburns.com>
- Date: Fri, 6 Jul 2007 11:20:43 -0500
- To: Josh Sled <jsled@asynchronous.org>
- Cc: gonchuki <gonchuki@gmail.com>, "HTML WG" <public-html@w3.org>
On Jul 6, 2007, at 8:50 AM, Josh Sled wrote: > gonchuki <gonchuki@gmail.com> writes: >> I have been looking through the source code of the "HTML 5 >> differences >> from HTML 4" document [1] as part of the Spanish translation task >> along with Alejandro Fernández and it came to my notice that the >> source is in pretty bad condition. > > While it looks like it's missing a close </body></html>, it's not > obvious > why you think it's in "bad condition", or isn't "friendly" or "human > readable". What's an example? I can understand why someone might find xml-like syntax more human readable. Particularly for complex markup, I often find myself looking for a close tag to know when an element ended. I know that if I were born an HTML parser, I would know that certain elements can exhibit their end by the appearance of one from another list of opening tags. I imagine that with practice, one gets more capable of coming up with the end-of-an-element in that manner. However, for novices, or those with a lot of experience reading xml-like HTM, or even just those who have trouble thinking like an SGML parser, I think leaving out closing tags is a human readability issue. The fascination some get from the idea that certain end tags can be left out, to me seems a bit reminiscent of the fascination some pioneering programmer once got when he said "eureka, I can express every year throughout eternity with just two digits,... or at least the important ones." This later led to some problems. I think now we're seeing similar problems with the optional omission of close tags: not the least of which we're finding our HTML serialization cannot be as expressive as our xml serialization. As examples, the discussion over tying to improve the <img> syntax or even <image> syntax. Also, as Henri just raised, the desire to include foreign namespaces in the HTML serialization is complicated by the lack of closing tags. I haven't thought through this, but perhaps we could require closing tags in the non-XML serialization to support any of the newly added HTML5 features (but for backwards compatibility, UAs would still need to process legacy HTML). It might be worth considering making the non-XML serialization of HTML5 a very XML-like serialization of HTML5. Obviously, the UA conformance would include requirements for inference of opening and closing tags, but our recommendation for authoring could require authors to always include closing tags (something like the HTML4.01 appendix C, but more thoroughly). I think simply the presence of XML and XHTML has led to greater awareness among authors of ill-formedness issues and invalidity. Its difficult to communicate proper nesting to authors while simultaneously trying to communicate the benefits of certain tags being omitted. Take care, Rob
Received on Friday, 6 July 2007 16:21:09 UTC