I'm slowly making the transition from XHTML1.1 to HTML5 but I'm having trouble getting my head around the new elements and when they should be used. Obviously <header>
, <nav>
, <footer>
& <article>
are self explanatory but <section>
, <aside>
are slightly confusing.
a document might look like this:
<div id="page-wrap">
<header>...</header>
<nav>...</nav>
<!-- What about the content? -->
</div>
So below the <nav>
you would have the content section, would this be开发者_开发知识库 <div>
or <section>
and why isn't there a <content>
tag?
My next issue is with a sidebar, after research I found that <aside>
shouldn't be used for a sidebar, but I also read that recently the specification has been updated to include <aside>
for sidebars if outside of the <article>
tag. So again why isn't there a sidebar element.
My confusion spans from the presence of <header>
, <nav>
, <footer>
. Almost every website I have ever made contains 5 sections; Header, Nav, Content, Sidebar & Footer so why is there only specific elements for 3 of these?
Hope you can clear things up for me.
In my opinion a sidebar is in the realm of presentation(css); so it was not included in the html5 specification.
精彩评论