By Martin / The Lab, (X)HTML & CSS / Wednesday August 13th, 2008 / 1 comment
Recently, I was browsing through the HTML 4.01 Strict DTD and some other material on SGML, and I was suprised to find just how ... accepting HTML is. After some exploration, I discovered even the following document validates (all of it is shown).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HEAD<TITLE>Test</>
<BODY<P<IMG SRC=test.jpg ALT=validation>
This document validates... somehow...
This uses the "obscure" feature of SGML-based languages known as SHORTTAGS - which means that if unambiguous enough tags don't have to be closed, and if necessary they can be closed with </>, instead of stating the full name.
However, hardly any of us exploit these features, so, this is yet another reason to use XHTML - because we almost do so anyway, most of the time! Unless you need to save space, that is...
∎
I hope you enjoyed reading this article. If you wish, you may view some of the other recent or popular things I have written, or subscribe to receive RSS updates. You can also add a comment, or share this article on Twitter or Facebook, below.
Website copyright © Aspektas 2009 - 2010 Valid XHTML 1.0 Strict and CSS 2.1