Re: The BODY element and inline content

At 11:33 PM 11/3/99 -0500, Mark Cidade wrote:
>I feel like I'm missing something...

>  The changes for the BODY declaration between DTD's aren't mentioned
>anywhere in Appendix A for the HTML 4 spec, nor is it acknowledged in
>the HTML 4.01 spec.

Indeed.

>  If this is true, does this mean that in HTML 4 you cannot use any
>inline elements (aside from INS or DEL) or PCDATA directly in the BODY
>element? 

That's right, for HTML4.0 with the strict DTD. 
To be precise, you can use SCRIPT in BODY, and this is 
also an inline element.

> If so, the following would be invalid:
>
>  <html>
>  <head><title>untitled</title></head>
>  <body>
>    <a href="http://www.w3.org">This link is invalid.</a>
>    This is invalid, too&reg;!
>  </body>
>  </html>
>
>Is there something I'm not getting here?

You are getting it right. In the loose DTD though, this is allowed.
Also in XHTML1.0 it is allowed.

So this restriction of HTML4.0 strict is nothing to worry about. 
You can use the loose DTD, and the future version of HTML, XHTML, 
allows inline content in both strict and transitional DTDs.

Regards,
Nir.
===================================
Nir Dagan
Assistant Professor of Economics
Brown University 
Providence, RI
USA

http://www.nirdagan.com
mailto:nir@nirdagan.com
tel:+1-401-863-2145

Received on Wednesday, 3 November 1999 23:54:05 UTC