homepage Welcome to WebmasterWorld Guest from 54.198.42.213
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
html5 new tags question
html5 tag
mihomes




msg:4452477
 5:03 am on May 12, 2012 (gmt 0)

Working on a new site design and will be using html5 instead of xhtml strict this time around. Not much different actually, but I did have a question that maybe someone can answer...

<nav><nav> as an example... I have found that eventhough I have stated these new tags in my css and blocks that older browsers will not show any stylization for them. As an example, I stylizied my nav the other day and the only way to get it to work properly was to use <nav><div> where my div was the actual stylization.

So, I guess what I am asking is do these new tags such as header, nav, article, etc operate in the way I would expect them too - everything contained within them?

Related question is I have read that nav should be used for the main navigation of the page and not every single group of links...aside would be best used for something like a sidebar (relevant links and info to the page content), and article should be the actual main content of the page (such as product details/description) if a product page. Section on the other hand sounds like it would never really be used... does this all sounds about right? I have a feeling these are going to be used down the road by engines so I figure might as well get the layouts done right to begin with.

 

CoursesWeb




msg:4453107
 6:42 am on May 14, 2012 (gmt 0)

Hi
I add ID attribute in <section>, <nav>, ..., then in css i reffer to that id.
Also adding in css:
header, footer, section, aside, nav, article {display: block;}
I think is better to have less tags in the code, without <div> in <nav>:

<nav id="menu">
<ul>
<li>...</li>
<li>...</li>
</ul>
</nav>

Fotiman




msg:4453255
 1:45 pm on May 14, 2012 (gmt 0)


older browsers will not show any stylization for them

That's what [modernizr.com...] is for. :)

mattur




msg:4455297
 11:45 am on May 19, 2012 (gmt 0)

As Fotiman says, you can use Modernizr to get old IE to recognise the new HTML5 sectioning elements. Modernizr includes the HTML5 Shiv, which you can read more about here:

[paulirish.com...]

test2009




msg:4465242
 3:42 am on Jun 14, 2012 (gmt 0)

Related question is I have read that nav should be used for the main navigation of the page and not every single group of links...aside would be best used for something like a sidebar (relevant links and info to the page content), and article should be the actual main content of the page (such as product details/description) if a product page.

tedster




msg:4465271
 4:10 am on Jun 14, 2012 (gmt 0)

Something many people don't realize, many of the new HTML5 tags came from research that Google did, noting what class and ID names were being commonly used by web authors. The idea is to standardize a lot of that mark-up and thereby simplify the source code, and yes -- make it communicate in a clearer fashion to anyone who works on the code.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved