Take the 2-minute tour ×
Code Review Stack Exchange is a question and answer site for peer programmer code reviews. It's 100% free, no registration required.
  </header>
  <!--content start-->
  <div role="main">
    <div id="slider">
    <ul id="sliderContent">
        <li class="sliderData">
            <header>
                <h2>Some relevant title</h2>
            </header>
            <p>Lorem ipsum.... </p>
            <a href="#">read more...</a>
        </li>

This is what i've written so far. is it best practice?

share|improve this question
    
This will be useful to you: developers.whatwg.org Also, your question is too vague. –  ANeves Feb 20 '12 at 10:33
add comment

2 Answers 2

I would maybe replace the h2 tag with em and remove the wrapping header tag(unless you want it part of your seo). If your slider content contains an image you could us figure and figcaption.

<li class="sliderData">
    <figure>
        <img src="" alt="" />
        <figcaption>
            <em class="header">Some relevant title</em>
        </figcaption>
    </figure>

    <p>Lorem ipsum.... </p>
    <a href="#">read more...</a>
</li>

Note that you don't need to give ids and classes to every element, CSS selectors are more powerful than that. Selecting the li in your code is simply done with ul#sliderContent li. Your div is also probably useless: the <ul> was enough.

share|improve this answer
add comment

I think you should replace <div role="main:> with <nav>

share|improve this answer
    
mmmm...that's part of the HTML5 boilerplate. I would keep that as it is.... –  Maroshii Feb 19 '12 at 3:34
    
then I think it may be correct!! –  Ashutosh Dave Feb 19 '12 at 11:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.