Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

HTML5 Structure

So I am trying to concentrate on creating strong page structure using HTML 5 - the code below is for a website that has a header area containing Logo (h1) and nav.

Underneath will be a slideshow element

Under this is the main text content of the page

Under this is an area holding newsletter sign up, latest news and latest tweets

Then to wrap things up a footer with social links and address info

So the code I am using is as follows

        <header>
    <!-- Start of header -->
    <h1>Website Name</h1>
    <nav>
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </nav>
    <ul></ul>
    </header>
    <!-- End of header -->

    <!-- Start of slideshow -->
    <section class="slideshow">

    </section>
    <!-- End of slideshow -->

    <!-- Start of Main Body -->
    <section>
        <h2>Welcome</h2>
    </section>
    <!-- End of slideshow -->

    <!-- Start of feeds -->
   <section>
        <article>
            <h3>Newsletter Sign Up</h3>
        </article>
        <article>
            <h3>Latest News</h3>
        </article>
        <article>
            <h3>Latest Tweets</h3>
        </article>
    </section>
    <!-- End of feeds -->

    <footer>
        <ul></ul>
        <p>address info</p>
    </footer>

There are 3 questions

  1. Is it ok to have NAV as untitled when looking at the HTML5 outline tool in Chrome
  2. Should the slideshow sit in a section or a div
  3. Should the area with the newsletter sign up be a section with nested articles / an aside with nested articles / a div with articles (as I will need to float all 3 articles) and is it ok that if it is a section or an aside that this remains untitled.

Sorry this is a bit wordy.

G

2 Answers

You can use DIV for creating whole website also. HTML5 tags are only for teh purpose of quick identifying. SO if anyone else working on ur code can easily pickup.

Also, And answer for your que. http://jsfiddle.net/YcUg8/

John Locke
John Locke
15,479 Points

Looks fine to me. The only thing that I might do differently is use an article tag for the main body text, but that's just me.

Articles, sections, and nav are really just divs with more semantic meaning, so you're fine there.

Untitled navs are OK in the outline, as far as I know.