I don't think w3c standards will allow mark-up this way, so I was wondering the best way to mark up a header for a list. looking for standards, and accessibility.
what I currently have is:
<div id="list1"> <ul class="navlist"> <h3>Most Requested</h3> <li><a href="#" title="How to Enroll"How to Enroll</a></li>
...
Bruce,
As you appear to realize you're not supposed to put an h3 tag (or anything except li) immediately inside a list. Therefore I suggest simply preceding the list with the head:
<div id="list1">
<h3>Most Requested</h3>
<ul class="navlist">
<li><a href="#" title="How to Enroll">How to Enroll</a></li>
...Because the h3 comes inside the identified div, you can specify it precisely in your stylesheet without any further markup, giving it and the ul the proper margins & padding to hug each other as closely as you need.
If for some reason you didn't want to use a head external to the list, you might be able to get away with:
<div id="list1">
<ul class="navlist">
<li class="head">Most Requested</li>
<li><a href="#" title="How to Enroll">How to Enroll</a></li>
...However this seriously compromises your semantics, losing the head tag and forcing a list item to pose as the heading for the list it's in, which it's not. As I see it, the items of a list all reside on the same semantic level.
Perhaps more sensible would be to make the heading an item in a top-level list, within which sits your navlist:
<div id="list1">
<ul class="navlistbox">
<li>Most Requested
<ul class="navlist">
<li><a href="#" title="How to Enroll">How to Enroll</a></li>
...
</ul>
</li>
...Paul
PS: If you can't see the list item "How to Enroll" it's because you omitted the close-anglebracket after the title attribute. You typed:
<li><a href="#" title="How to Enroll"How to Enroll</a></li>
****************************************************** The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
