Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
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
- Is it ok to have NAV as untitled when looking at the HTML5 outline tool in Chrome
- Should the slideshow sit in a section or a div
- 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.
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 Locke15,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.