Header in semantic HTML5 -


i designing semantic mark-up of html page. page consists of main content block , of side bar. there several independent blocks in side bar latest news, links, statistics e.t.c. each block has header block name: "statistics", "links" e.t.c.

the question. semanticly correct usage of tag header if put block name in header tag <section id="news"><header>news</header><ul>...</ul></section>.

is semanticly correct put name of section in <h*> tag instead?

what difference between options , why 1 should use 1 of options?

as using sectioning element (section in case, might want use aside), these sections have implicit outline entry.

you can provide explicit entry using heading (h1-h6).

so yes, should use heading element (h1-h6) specifying heading of each block (→ section).

in addition, may use header element. not required (it makes sense use if header consists of more heading).

so i’d go with:

<aside>   <h1>news</h1>   <!-- content --> </aside>  <aside>   <h1>statistics</h1>   <!-- content --> </aside> 

and complex headers:

<aside>   <header>     <h1>news</h1>     <!-- more header content -->   </header>   <!-- content --> </aside>  <aside>   <header>     <h1>statistics</h1>     <!-- more header content -->   </header>   <!-- content --> </aside> 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -