Question on HTML 4.0 tags

liunx

Guest
I have been reading several sites now concerning the tags in HTML 4.0 and 4.01....and each seems to contradict the other.<br />
<br />
One site says that in HTML 4.0 the tags should be lower case like <head> and </head> while another is saying the exact opposite.<br />
<br />
So in order for a document to validate as HTML 4.0 which is it...upper or lowercase.<br />
<br />
P.S..No ambiguity now! :D<!--content-->In HTML 4.01, your tags can be either lowercase or uppercase. It is in XHTML that your tags must be in lowercase (due to the case-sensativity of XML). Also, in XHTML, you can not use empty attributes, and tags must have closing tags. All due to the fact that XHTML is the XML version of HTML.<br />
<br />
I personally use all lowercase tags even with HTML 4.01...<!--content-->Cool..thanks Pyro! I had read somewhere that HTML 4.0 uses lowercase but I wasn't sure..and since you seem to be the HTML guru..I knew you'd have the answers! :D<!--content-->Glad I could be of service, though others on this forums know the inner workings of HTML better than I... ;)<!--content-->For the record, the element and attribute names for a given version of HTML (or SGML application as it is properly known) are defined in the Document Type Definition (DTD). The HTML 4.01 DTD, like all HTML DTDs, defines the element names in upper case and the attribute names in lower case. (<!-- m --><a class="postlink" href="http://www.w3.org/TR/html4/sgml/dtd.html">http://www.w3.org/TR/html4/sgml/dtd.html</a><!-- m -->)It's just that HTML is case insensitive. <br />
<br />
XHTML, being an XML application, is case sensitive and the DTD defines everything but some entities in lower case. (<!-- m --><a class="postlink" href="http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_XHTML-1.0-Strict">http://www.w3.org/TR/xhtml1/dtds.html#a ... 1.0-Strict</a><!-- m -->)<!--content-->
 
Back
Top