MEM
MEM

Reputation: 31307

HTML 5 - Section - Div - Header - can a div be placed between section and header?

I have this section and, for layout proposes I would need two divs inside that section. Of of them, should wrap the header part of section.

So:

<section>
 <div id="layout-stuff">
  <header>
    <h1>This is the section header</h1>
  </header>
  ...
 </div>
</section>

Is this ok?

Upvotes: 0

Views: 536

Answers (2)

Damon Bauer
Damon Bauer

Reputation: 2726

Yes, you can do this. a <div> is nothing more than an element to hook styles with.

Upvotes: 1

JSeven
JSeven

Reputation: 655

Looking at the header tag definition on w3schools it says:

"Note: A tag cannot be placed within a footer, address or another header element."

So, it does not seem to be any of this cases. My guess It's fine to do it.

http://www.w3schools.com/html5/tag_header.asp

Upvotes: 0

Related Questions