skunker — 2013-04-04T09:05:17-04:00 — #1
Lets say you have a home page with a banner (slider) right below the logo and nav menu. Do you place that banner in the HEADER area or the SECTION area? I'd like to avoid the vanilla DIV element for semantic purposes.
In other words, is the BANNER normally considered part of the HEADER?
Thanks for any clarification.
ralphm — 2013-04-04T10:31:50-04:00 — #2
Theoretically, the <header> element is meant to contain "introductory or navigational aids", which is not really the purpose of a slider, as I see it, although I guess you could argue otherwise. I think of it more as regular content, so I'd put it in a <section> (that is, if I were prepared to use these elements at all, which I'm not, as I consider them to be vague and silly. I would probably use a UL.)
dresden_phoenix — 2013-04-04T16:05:30-04:00 — #3
This is why I often say SEMANTICS is about what you MEAN TO SAY, not about tags or placements.
Before HTML5, I GENERALLY structured a page like this:
<div class="motto">most often a client is too confused to actually develop some branding copy and relies instead on sliders (shotgun approach, but ok) so this worked nicely</div>
on occasion i used a cephalothorax (as content and foot being metaphorically the abdomen for some reason) which simply meant I put a wrapper around NAV and BRANDING. remember that there is nothing wrong with having the occasion DIV in HTML5
So it really depend on what the slider is. Think about it this way ... if you were placing a simple motto or mission statement in the same place in the header would you feel such trepidation? So if the slider is just a poor marketing strategy for clients who can decide on an identity and this what they ape putting in place of a mission statement or motto , or list of capabilities.. then it quite reasonable to have the slider in the main header, is it not?
If the slider is really just a 'portfolio', or functional mini pages .. then it most likely just a SECTION .
Hope that helps
rammurtee — 2013-05-30T02:49:47-04:00 — #4
it depends on the content of slider. If it is not important, it should be placed as section.
lvhermesuk — 2013-06-04T05:40:12-04:00 — #5
stomme_poes — 2013-06-05T05:27:16-04:00 — #6
No such role exists that I know of. I think unlike classes, you're restricted in your role values.
Skunker: be aware there is something in HTML called "banner" but that's not what you're talking about, so in case you find articles talking about banners, know this is completely different.
<header role="banner"> is not uncommon; the "banner" role is usually analogous to the main document <header>: showing as ralph said general site logos and sometimes navigation, which don't change per page. They're used for site orientation and create an easy-to-skip area once users are familiar with the site already. There is only one "banner" role per page, while there can be multiple <header> tags throughout.
Your banner would not belong in the role="banner" box (or doesn't sound like it), but maybe right under it in a separate div if you want.
ioan — 2013-06-25T11:58:36-04:00 — #7
I normally structure it like this:
<header id="banner" role="banner">
<h1><a href="index.php">My Agency Name</a></h1>
<span><a href="index.php">my cheesy slogan and opening hours</a></span>
</div><!-- logo -->
<nav id="menu" role="navigation">
<address>0770 123 4567</address>
<li class="selected"><a href="index.php">HOME</a></li>
<li><a href="new.php">NEW GIRLS</a></li>
<li><a href="about.php">ABOUT US</a></li>
<li><a href="contact.php">CONTACT US</a></li>
</header><!-- header -->
<div id="content" role="main">
</section><!-- slider -->
</div><!-- content -->
Sometimes I keep it outside the content area, but never inside the header. Hope this helps. Sorry for the weird indentation, it looks like crap.