[thelist] RE: [WD]: use of display:block hindering xhtml validation?

Lindsay Evans lindsay at redsquare.com.au
Fri Oct 19 00:09:29 CDT 2001


Well, according to the XHTML 1 Strict DTD, the <body> element can only
contain block elements (plus other stuff like <script>).

So, you can either change your code so that <code> and <a> are inside block
elements, or you can hack your own doctype together.

All you'd need to do is get the XHTML 1 DTD
[http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd], and change the line:

<!ENTITY % block
     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">

to:

<!ENTITY % block
     "p | %heading; | div | %lists; | %blocktext; | fieldset | table | code
| a">

then upload it to you server, and point your doctype declaration in your
html at it:

<!DOCTYPE html PUBLIC "-//Widget Corp//DTD XHTML 1.0 Strict plus nasty
body - inline hack//EN" "http://www.you.com/DTD/xhtml1-strict-inline.dtd">

Mind you, I'd recommend the first option over the last, who knows what sort
of evil things it would do to the browsers :o)

(can anyone tell I've been frigging around with dtds today?)

--
 Lindsay Evans.
 Developer,
 Red Square Productions.

 vox: 8596.4000
 fax: 8596.4001
 web: www.redsquare.com.au





More information about the thelist mailing list