Tuesday, November 18, 2008

 

Guide to HTML 5

The Web Developer's Guide to HTML 5 is available as an Editor's Draft on the W3C website.

There are some annoying discrepancies between HTML 4 and XHTML, at least formally. For example, say you want to insert a <br> tag into a page. In HTML, strictly following the rules, you have to leave the tag unmatched. The trailing-slash construct of XML isn't allowed in HTML, and an explicit closing tag is strictly speaking not permitted either. In XHTML, of course, you must close the tag, either using <br/> or <br></br> This meant you couldn't use the same markup for HTML and XHTML. In practice this really isn't an issue, since just about all current browsers do allow the trailing slash for HTML, but it's still an annoyance for strict validation. HTML 5, however, allows the trailing slash, so HTML and XHTML can use the same markup for line breaks.

The article says: "Both the HTML and XHTML syntax appear similar and it is possible to mark up documents using a common subset of of the syntax that is the same in both, while avoiding the syntactic sugar that is unique to each." Perhaps this is really true, or close to it.

Labels: , ,


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

free hit counters
free hit counters
hits since 30-Oct-2006