Re: a suggestion

* Walter Horodyski wrote:
>I used the HTML validator and it flagged the following as an error:
>
><ul style="list-style-image:url(chkbullet2.jpg)"></ul>
>
>I understand the issue (i.e., failure to include LIs in the parent 
>element) but it seems this should be a warning rather than an error. Let 
>me explain.

What is an error is defined by the relevant specifications, e.g. the
HTML 4.01 Recommendation <http://www.w3.org/TR/html4/>, please check
the specifications on where to send comments, in case of HTML 4.01
that would be the www-html@w3.org and www-html-editor@w3.org mailing
lists.

>After the page containing this UL is rendered by the browser, I use a 
>script to dynamically add LI child nodes to the list as they are 
>required. This is a DHTML coding technique that seems to effectively and 
>legally exploit the capability offered to me by the DOM. In the end, my 
>page fully complies with the reasoning used by the Validator. So, I 
>think the Validator needs to take this possibility into account and call 
>the above construct a "warning" with an appropriate explanation, similar 
>to the one I've offered, and accept the page as VALID HTML.

You can easily solve such problems by generating the ul container
element through the same means as generating the li elements.

Received on Thursday, 21 October 2004 16:36:29 UTC