
Bowerbird wrote:
to give you an idea of the necessary changes, <center><h3><a href="#toc"> chapter one </a></h3></center> passes the validator, but <h3><center><a href="#toc"> chapter one </a></center></h3> does not. it wants the header tag nested inside the center tag, not vice-versa. since "the validator knows html better than i do", i'm sure there is some "good" reason for this discrepancy, but i don't know -- or care -- what it might be, because both ways work fine in 99% of the browsers out there in the installed base.
<h3> (and the other header elements) may not contain any block level content, only textual content (PCDATA) and other inline tags (e.g. <i>, <span>, <a>, etc.) <center> is itself a block level tag, identical to <div align="center">. Thus, <center> should not be used within <h3>. Here's the link to the HTML 4 spec, which is very useful to understand the many HTML tags, their semantics, their attributes, and content models (what they may contain): http://www.w3.org/TR/REC-html40/present/graphics.html#edef-CENTER Since <center> is deprecated (and no longer appears in XHTML 1.1), it is best not to use it. Use CSS instead. For example, CSS can be directly applied to the <h3> (and other header) elements. Now, if you gotta have certain stuff center in the absence of CSS, then you can do the following. Instead of: <center><h3> ... </h3></center> do: <h3 align="center"> ... </h3> The 'align' attribute can be used for a lot of block-level elements: http://www.w3.org/TR/REC-html40/present/graphics.html#adef-align It, too, is deprecated (and removed from the newest XHTML), but if you were going to use <center> come hell or high water, then using the 'align' attribute instead leads to simpler markup. Plus now you can specify values of 'left', 'right', 'center' and 'justify'. It should work in all HTML 3.2/4.0 browsers.
as long as it works, i'm done with it, and any more time invested is a waste of my time. as i said, i understand why project gutenberg requires validation -- because they cannot scrutinize every .html file that is submitted to them to ensure that "it works" -- so when i am submitting a file i'll make sure that it validates. but otherwise, i will make sure my converter outputs files that do _not_ validate, since i don't want any of my "antagonists" here using _my_program_ to further their technoid aims which are directly contrary to my own...
<laugh/> Jon