Is HTML5 to HTML5 Bad?

So, I was playing with an HTML site that I was redesigning. And thanks to the HTML5 shiv , I use the brilliant new HTML5 tags very liberally. Therefore, I begin to feel that I have a lot of interference. For instance:

<header>
    <nav>
        <h1 id="logo"><a href="/">Logo Image CSS'd in here</a></h1>
        <ul>
            <li><a href="/page-1">Page 1</a></li>
            <li><a href="/page-1">Page 2</a></li>
            <li><a href="/page-1">Page 3</a></li>
            <!-- etc. -->
        </ul>
    </nav>
</header>

I included my logo in <nav>because I had space limitations and removed the explicit Home link (my home page is just a summary of the contents of the subpages with embedded links to them). Therefore, semantically, I suggested that an HTML5 document should have both <header>and <nav>. In the end, it just <nav>doesn’t mean that this is the main navigation page (I use <nav>to wrap my breadcrumbs and bottom links), and I feel that my <ul>float is <header>missing <nav>.

Am I an HTML5 hipster too and am using it here? Or is it too complicated (especially since the tag <header>has the entire style, but <nav>does not) is superfluous?

+5
source share
3 answers

, . , . <header> , . , <nav>, , , <nav> .

nav. , , .

+1

. , header nav . .

+2

What you look good. If you want to be picky, then your header logo may be outside of your navigator (you can float nav with css to fit space constraints). However, since your logo may be part of the navigation (since this is your home link), I think you're fine to include it.

The boiler can be a little complicated, so I like to show people this as a link: https://github.com/impressivewebs/Easy-HTML5-Template/blob/master/index.html

+1
source

All Articles