Forum Moderators: open

Message Too Old, No Replies

Working with Lists

Semantic structuring of list elements.

         

pageoneresults

5:28 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



While setting up a page that serves as an index for a particular section of a site, I am currently using an ordered list <ol> to categorize the content.

I've always wondered at what point you could use an <h4> through <h6> element according to the specifications.

Does this look semantically correct?

<h1></h1>
<ol>
<li>
<h2></h2>
<ul>
<li>
<h3></h3>
<ul>
<li>
<ul>
<li>
<h4></h4>
<ul>
<li>
<ul>
<li>
<h5></h5>
<ul>
<li>
<ul>
<li>
<h6></h6>
<ul>
<li></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li></li>
</ul>
</li>
<li></li>
</ul>
</li>
</ol>

Yes, I do use the Outline option when validating pages like this. The outline looks just like the page does when viewed in the browser. Nice!

Keep in mind that the above code is for one section of the <ol>. There are about 10 categories (ordered) total with a barrage of sub-categories (some ordered, others unordered). Working with lists is fun!

Robin_reala

6:11 pm on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Looks fine to me. You're not making the usual mistake of nesting the headers or sublists directly inside parent lists instead of list items, so it's all good.