- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Wed, 20 Dec 2006 14:44:06 +0200 (EET)
- To: Casey Benson <casey@caseybenson.com>
- cc: www-validator@w3.org
On Wed, 20 Dec 2006, Casey Benson wrote: > <ol type="none" onMouseOver="this.style.color='red'" onMouseOut="this.style.color='#A2A2A2'">BREECHES > <li onMouseOver="this.style.color='black'" onMouseOut="this.style.color='#CCCCCC'">Helsinki V Cotton</li> > </ol> > =============================== > However it seems it is an illegal instruction No, it is invalid markup. As David explained, you cannot have text data directly inside an <ol> element, since the element's content model allows <li> elements only. Unfortunately there is no markup specifically for a list header, which is what "BREECHES" is probably supposed to be. There are several options in practice. You could take the list header out of the list, putting it right before the list as a <div> element or some heading element. Then you might need some styling to achieve the same layout as you have now. Alternatively, you could put it inside a <li> element but use styling to make it appear as unnumbered and the value="1" attribute to make the first real list item have the number 1: <ol> <li class="lh" onMouseOver="this.style.color='red'" onMouseOut="this.style.color='#A2A2A2'">Breeches</li> <li value="1" onMouseOver="this.style.color='black'" onMouseOut="this.style.color='#A2A2A2'">Helsinki V Cotton</li> </ol> Note: I removed the type="none" attribute, which is incorrect though valid (its declared type is CDATA, so anything goes as far as validation is considered, but HTML specifications allow a small set of different values only). > What I like to see added is a bit of code that will increase/decrease the font by a percentage of the screen size. This has nothing to do with validation. Besides, the idea is wrong. Font size should depend on what is most readable to the user, not on the screen size, which varies between 0 and infinity. -- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Wednesday, 20 December 2006 12:44:35 UTC