Re: Why HTML should be taught as HTML without pretending it is XML

2007/7/21, Terry Morris:
> At this point I believe it is up to the W3C to follow this groundswell push
> for standards and stricter coding. I've been personally dismayed by the
> posts on this list suggesting that old-style coding will be preferred in
> HTML5.

In text/html yes, but you have the choice to use XHTML5
(application/xhtml+xml) if you prefer XML's strictness.

> I teach community college web development courses. We cover XHTML
> (Transitional 1.0) and CSS. Students are required to write code that passes
> W3C XHTML and CSS validators. This structure and attention to detail serves
> them well as they continue in later courses and learn JavaScript and
> server-side scripting.

You'd just have to teach XHTML5. But if you don't teach them XML (i.e.
you're teaching them "XHTML 1.0 Appendix C" [1], then you're lying to
your students: you're not teaching them XHTML, you're teaching them a
"buggy HTML 4" that looks like XHTML.

> It's my hope that the W3C's work with HTML5 will support coding standards
> for web authors.

In the HTML5's text/html serialization, trailing slashes in void
element's start tag are allowed (to make that "buggy HTML 4 that looks
like XHTML" [1] valid, by allowing void element's start tag to look
like XML's EmptyElemTag [2]). you could continue to teach your students the same coding
standards / guidelines and now really be teaching them valid HTML ;-)


Thomas Broyer

Received on Saturday, 21 July 2007 17:24:27 UTC