I have a somewhat geeky question regarding semantics for all you experts (and non-experts - you're all welcome to answer):
On, for instance, seedmagazine.com, you can see a heading, Departments, marked up as an h2, and a number of articles for various departments of the site below this heading. The structure looks something like this:
To me it would make more sense to have the article title as the "main heading" below the Department heading. What's your opinion? And let's say that you agree with me, how would you code it?HTML Code:<h2>Departments</h2> <div> <h3><a href="#">Ideas</a></h3> <h4><a href="#">Some article belonging to the Ideas department</a></h4> <p>Text text text</p> </div> <div> <h3><a href="#">Ideas</a></h3> <h4><a href="#">Another article belonging to the Ideas department</a></h4> <p>Text text text</p> </div> <div> <h3><a href="#">World</a></h3> <h4><a href="#">Some article belonging to the World department</a></h4> <p>Text text text</p> </div>
Option 1:
Option 2:HTML Code:<h2>Departments</h2> <div> <div><a href="#">Ideas</a></div><!-- or maybe a "p"? --> <h3><a href="#">Some article belonging to the Ideas department</a></h3> <p>Text text text</p> </div>
Option 3:HTML Code:<h2>Departments</h2> <div> <h3><a href="#">Ideas</a> <a href="#">Some article belonging to the Ideas department</a></h3> <!-- Include the department in the article heading --> <p>Text text text</p> </div>
Option 4:HTML Code:<h2>Departments</h2> <div> <h3><a href="#">Some article belonging to the Ideas department</a></h3> <h4><a href="#">Ideas</a></h4><!-- Switched the heading order, and would later position this above the h3 with css --> <p>Text text text</p> </div>
Same as option 3, but with some other tag instead of the h4, like a div or a p.
Option 5:
Some other way of doing it I haven't mentioned...
And, for the record, this is not meant as criticism towards seedmagazine, 'cause I really like the site - it's just that the above is a pretty common scenario which I have a tendency to "solve" differently each time I encounter it
OK, shoot!







Bookmarks