W3C home > Mailing lists > Public > www-html@w3.org > November 1999

Re: The BODY element and inline content

From: Nir Dagan <nir@nirdagan.com>
Date: Wed, 03 Nov 1999 23:56:13 -0500
Message-Id: <199911040454.XAA26649@vega.brown.edu>
To: www-html@w3.org
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.


>  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

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.

Nir Dagan
Assistant Professor of Economics
Brown University 
Providence, RI

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:51 UTC