Skip to content

Instantly share code, notes, and snippets.

@oneblackcrayon
Last active August 29, 2015 14:02
Show Gist options
  • Save oneblackcrayon/73719eb651a65a5462a4 to your computer and use it in GitHub Desktop.
Save oneblackcrayon/73719eb651a65a5462a4 to your computer and use it in GitHub Desktop.
Deciding which is semantically correct

One

    <header>
      <!-- stuff -->
    </header><!-- end /header -->
    <main>
      <header>
        <!-- main header stuff -->
      </header>
      
      <!-- stuff -->
      
      <footer>
        <!-- main footer stuff -->
      </footer>
    </main><!-- end /main -->
    <footer>
      <!-- stuff -->
    </footer><!-- end /footer -->

Two [for me more semantically correct]

    <header>
      <!-- header stuff outside main -->
    </header><!-- end /header -->
    <main>
      
      <!-- stuff -->

    </main><!-- end /main -->
    <footer>
      <!-- footer stuff outside main -->
    </footer><!-- end /footer -->

Three

    <main>
      <header>
        <!-- header stuff inside main -->
      </header><!-- end /header -->
  
      <!-- stuff -->
  
      <footer>
        <!-- footer stuff inside main -->
      </footer><!-- end /footer -->
    </main><!-- end /main -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment