|  | Posted by Benjamin Niemann on 10/02/06 17:04 
Hello,
 petermichaux@gmail.com wrote:
 
 > When I validate a HTML 4.01 STRICT document it doesn't like to see a
 > closed tag like this
 >
 >   <link rel="stylesheet" href="base.css" type="text/css"/>
 >
 > but it is happy with
 >
 >   <link rel="stylesheet" href="base.css" type="text/css">
 >
 > Does anyone know why the link cannot be closed in HTML?
 
 LINK has the content model EMPTY - this means that it cannot have any
 content and must not have an end-tag.
 
 <ELEM .. /> is a short-hand for <ELEM ..> .. </ELEM> *in XML*, but HTML is
 based on SGML, which does not have such a syntax (it does have a similar
 looking syntax with a complete different meaning).
 XML introduced this short-hand syntax, because it does not know the content
 model EMPTY, but elements without content are pretty often used.
 
 > It seems
 > strange if HTML 4.01 is supposed to be closely parallel with XHTML.
 
 HTML 4.01 is older than XHTML and it was never supposed to have anything in
 common with XHTML. XHTML 1.0 on the other hand was supposed to be a
 semantically equal reformulation of HTML 4.01 with the slightly different
 XML syntax rules.
 
 HTH
 
 --
 Benjamin Niemann
 Email: pink at odahoda dot de
 WWW: http://pink.odahoda.de/
  Navigation: [Reply to this message] |