Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can the <header> tag be contained within the <aside> tag in HTML5?

I'm wondering if this construction would be semantically correct in HTML5.

<html>
<head></head>
<body>
    <aside>
        <header>
            <h1></h1>
        </header>
        <div>

        </div>
    </aside>
    <section id="content">

    </section>
</body>
</html>

What I want is a left bar taking the 30% of the screen, with the logo and some stuff below it, and then the content taking the other 70% on the right side.

Thanks a lot.

like image 991
Puigcerber Avatar asked May 24 '11 10:05

Puigcerber


1 Answers

Given that HTML5 is still a draft, the specs says

A header element is intended to usually contain the section's heading (an h1–h6 element or an hgroup element), but this is not required. The header element can also be used to wrap a section's table of contents, a search form, or any relevant logos.

and

The [aside] element can be used for typographical effects like pull quotes or sidebars, for advertising, for groups of nav elements, and for other content that is considered separate from the main content of the page.

and the only "restriction" on the <aside /> tag is

It's not appropriate to use the aside element just for parentheticals, since those are part of the main flow of the document

event though there are no explicit examples with <header /> tags inside <aside /> tags, I would consider them OK.

Links:

  1. http://dev.w3.org/html5/spec/Overview.html#the-header-element
  2. http://dev.w3.org/html5/spec/Overview.html#the-aside-element
like image 178
Albireo Avatar answered Sep 23 '22 08:09

Albireo