views:

60

answers:

1

Hi,

I'm writing a new webpage for a company and I have (a sane subset of) HTML5/W3C recommendations in mind.

After reading the semantic meaning of <hr />, I was wondering if this was a good place to use it:

<section name="historyItem">
    <h2>2002</h2>
    <p>Dolorem ipsum dolor sit amet in 2002, consectetur [...]</p>
    <hr />
    <ul>
        <li><a href="#">Link A</a></li>
        <li><a href="#">Link B</a></li>
    </ul>
</section>

My line of reasoning is that, yes, that <hr /> represents a thematic change from section description to section links, but I'm unsure about that.

Maybe "thematic change" means to have a new paragraph later on another subject, and thus my example wouldn't be "correct". What do you think?

(ps.: Yes, that <ul> is CSS-styled to fit a single line and look cool)

+3  A: 

I see what you mean. But personally I just wouldn't bother. Ask yourself why you're using the tag in the first place. If you want to delineate a change between the paragraph and the links, then in terms of pure mark-up I don't reckon it's required. If it's about the look and feel of your page (i.e. you want a rule demarcating the two areas), then again I'd question its usefulness, given that you can apply a border to either the paragraph or unordered list tags.

Of course, given that this is html5, you could go the whole hog and use the <section> tag…

Ben Poole
They say there is an equivalence between `<hr />` and `</section><section>`, and since I'm already within a section, `<hr />` seems to be a better option.And if somebody were to tell me that my example isn't semantically "correct", then I'd go styling the bottom/top borders of either element, indeed, since graphically that line is important.
n2liquid
Yep, and apologies for ignoring your use of `<section>` already; I wasn't paying proper attention!
Ben Poole
No prob! Considering you were the only one to answer me, I appreciate it XD
n2liquid