<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>SGML reference information for HTML</title><link rel="previous" href="../interact/scripts.html"><link rel="next" href="sgmldecl.html"><link rel="contents" href="../cover.html#toc"><link rel="stylesheet" type="text/css" href= "http://www.w3.org/StyleSheets/TR/W3C-PR"><link rel="STYLESHEET" href="../style/default.css" type="text/css"></head><body><div class="navbar" align="center"> <a href="../interact/scripts.html">previous</a> <a href="sgmldecl.html">next</a> <a href= "../cover.html#minitoc">contents</a> <a href="../index/elements.html">elements</a> <a href="../index/attributes.html">attributes</a> <ahref="../index/list.html">index</a> <hr></div><h1 align="center"><a name="h-19">19</a> SGML reference information forHTML</h1><div class="subtoc"><p><strong>Contents</strong></p><ol><li><a class="tocxref" href="#h-19.1">Document Validation</a></li><li><a class="tocxref" href="#h-19.2">Sample SGML catalog</a></li></ol></div><p>The following sections contain the formal SGML definition of HTML 4.01. Itincludes the <a href="sgmldecl.html">SGML declaration</a>, the <a href="dtd.html">Document Type Definition</a> (DTD), and the <a href="entities.html">Character entity references</a>, as well as a <a href="#catalog">sample SGMLcatalog</a>.</p><p>These files are also available in ASCII format as listed below:</p><dl><dt><strong>Default DTD:</strong></dt><dd><a href="../strict.dtd">http://www.w3.org/TR/html40/strict.dtd</a></dd><dt><strong>Transitional DTD:</strong></dt><dd><a href="../loose.dtd">http://www.w3.org/TR/html40/loose.dtd</a></dd><dt><strong>Frameset DTD:</strong></dt><dd><a href="../frameset.dtd">http://www.w3.org/TR/html40/frameset.dtd</a></dd><dt><strong>SGML declaration:</strong></dt><dd><a href="../HTML4.decl">http://www.w3.org/TR/html40/HTML4.decl</a></dd><dt><strong>Entity definition files:</strong></dt><dd><a href="../HTMLspecial.ent">http://www.w3.org/TR/html40/HTMLspecial.ent</a><br><a href="../HTMLsymbol.ent">http://www.w3.org/TR/html40/HTMLsymbol.ent</a><br><a href="../HTMLlat1.ent">http://www.w3.org/TR/html40/HTMLlat1.ent</a></dd><dt><strong>A sample catalog:</strong></dt><dd><a href="../HTML4.cat">http://www.w3.org/TR/html40/HTML4.cat</a></dd></dl><h2><a name="h-19.1">19.1</a> <span class="index-inst" title= "document::SGML validation|SGML::document validation"><a name="idx-document">Document Validation</a></span></h2><p>Many authors rely on a limited set of browsers to check on the documentsthey produce, assuming that if the browsers can render their documents they arevalid. Unfortunately, this is a very ineffective means of verifying adocument's validity precisely because browsers are designed to cope withinvalid documents by rendering them as well as they can to avoid frustratingusers.</p><p>For better validation, you should check your document against an SGML parsersuch as nsgmls (see <a href="../references.html#ref-SP" class="informref">[SP]</a>), to verify that HTML documents conform to the HTML 4.01 DTD. If the<a href="../struct/global.html#version-info">document type declaration</a> ofyour document includes a URI and your SGML parser supports this type of systemidentifier, it will get the DTD directly. Otherwise you can use the followingsample SGML catalog. It assumes that the DTD has been saved as the file"strict.dtd" and that the entities are in the files "HTMLlat1.ent","HTMLsymbol.ent" and "HTMLspecial.ent". In any case, make sure your SGML parseris capable of handling <span class="index-inst" title= "document character set::ISO10646"><a name="idx-document_character_set" rel= "biblioentry" href="../references.html#ref-ISO10646" class="informref">[ISO10646].</a></span> See your validation tool documentation for furtherdetails.</p><p>Beware that such validation, although useful and highly recommended, doesnot guarantee that a document fully conforms to the HTML 4.01 specification.This is because an SGML parser relies solely on the given SGML DTD which doesnot express all aspects of a valid HTML 4.01 document. Specifically, an SGMLparser ensures that the syntax, the structure, the list of elements, and theirattributes are valid. But for instance, it cannot catch errors such as settingthe <a href="../struct/objects.html#adef-width-IMG" class="noxref"><samp class= "ainst-IMG">width</samp></a> attribute of an <a href= "../struct/objects.html#edef-IMG" class="noxref"><samp class="einst">IMG</samp></a> element to an invalid value (i.e., "foo" or "12.5"). Althoughthe specification restricts the value for this attribute to an "integerrepresenting a length in pixels," the DTD only defines it to be <a href= "../types.html#type-cdata">CDATA</a>, which actually allows any value. Only aspecialized program could capture the complete specification of HTML 4.01.</p><p>Nevertheless, this type of validation is still highly recommended since itpermits the detection of a large set of errors that make documents invalid.</p><h2><a name="h-19.2">19.2</a> <span class="index-inst" title= "SGML::catalog for HTML|catalog for HTML"><a name="catalog">Sample SGMLcatalog</a></span></h2><p>This catalog includes the override directive to ensure that processingsoftware such as nsgmls uses public identifiers in preference to systemidentifiers. This means that users do not have to be connected to the Web whenretrieving URI-based system identifiers.</p><div class="dtd-fragment"><pre>OVERRIDE YESPUBLIC "-//W3C//DTD HTML 4.01//EN" strict.dtdPUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" loose.dtdPUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" frameset.dtdPUBLIC "-//W3C//ENTITIES Latin1//EN//HTML" HTMLlat1.entPUBLIC "-//W3C//ENTITIES Special//EN//HTML" HTMLspecial.entPUBLIC "-//W3C//ENTITIES Symbols//EN//HTML" HTMLsymbol.ent</pre></div><div class="navbar" align="center"><hr><a href="../interact/scripts.html">previous</a> <a href="sgmldecl.html">next</a> <a href="../cover.html#minitoc">contents</a> <a href= "../index/elements.html">elements</a> <a href="../index/attributes.html">attributes</a> <a href="../index/list.html">index</a></div></body></html>