What would be the correct markup in this situation (page title and "rootline")?
So, in my current project, when you navigate to the "team" page, which has the path /home/about/company/team/
开发者_如何学Cthe header of the page looks like this:
/home/about/company/ <--- this is what i call the "rootline"
TEAM <-- this is the title of the current page
... content goes here ...
My current markup looks like this:
<h1>TEAM</h1>
<h2>/home/about/company/</h2>
<div id="content">
<h3>Content Headline</h3>
...
</div>
But it feels wrong to wrap the rootline in h2
tags. Actually, its not a headline, right? Whats your opinion on how to create good, semantic HTML in this case?
It doesn't really matter that you wrap it in an H2. It's semantically okay. Here's what the W3C has to say about heading tags (H1 - H6)-
A heading element briefly describes the topic of the section it introduces. Heading information may be used by user agents, for example, to construct a table of contents for a document automatically.
Your H2 is a subdescription of the H1. ie: H1 describes the page subject, H2 describes the location. Works okay in my mind.
精彩评论