...

View Full Version : changing a 3 col table to a list, correct html?



fatrat
01-02-2007, 09:19 AM
http://digitalpatriots.org/index.php?sid=2af9aac035c9640dd1052ef626417f2a&clan=0


the list on the top right, 'Active Scrims: 2' uses a table to align the image, description, and number.

would it be better to use a nest a horizontal list within a vertical list and space them out some how?


<ul>
<ul><li class=img>img</li><li class="desc">desc</li><li class="no">no</li></ul>
<ul><li class=img>img</li><li class="desc">desc</li><li class="no">no</li></ul>
<ul><li class=img>img</li><li class="desc">desc</li><li class="no">no</li></ul>
<ul><li class=img>img</li><li class="desc">desc</li><li class="no">no</li></ul>
</ul>



is that the correct sort of html?

ronaldb66
01-02-2007, 01:55 PM
First of all, a list should be nested inside a list item and not directly in the list itself, but judging by the implied meaning of these items a table would be suitable markup: there's an implied row-column arrangment, so a table will do nicely.

fatrat
01-02-2007, 03:36 PM
thanks for that ;)

wouldn't want to be unsemantic....

ronaldb66
01-03-2007, 08:10 AM
Well... this would be a case where more then one solution would do.
It could be argumented that this is a weak case for table markup, and a nested list (a "list of lists") would be just as fitting; there could also be some microformat (http://microformats.org/) which fits the bill even better.
As said, the clear arrangement of the data in a row and column fashion, albeit in the absence of column and/or row headers (these could be worked in just as well, though) spells "table" clear enough in my view.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum