Posts Tagged ‘html5 tag’

Using The “Section” Tag With HTML 5

If you are a budding HTML5 webmaster, there are plenty of new tags to play around with. The “section” tag ( element ) is one such tag. When it is right to use the “section” tag ? Read on to find out more on this here in this informative article.




The “section” element is a quirky tag. It confuses even those with lots of experience in making websites. It is a good thing for you to be here to avoid these same problems yourself. You will not have to unlearn anything and you will feel much better about your online prowess.




To make it clearer, it helps to quote the ones making the standard. They say; “Examples of sections would be chapters, the various tabbed pages in a tabbed dialog box, or the numbered sections of a thesis. A Web site’s home page could be split into sections for an introduction, news items, and contact information.” That is to say that if you think of your web site as a book, with corresponding pages, the section tag can be considered to be similar to chapter headings. Just do not think of them as headings, since headers on a web page are not going to be the same as a section. There is another new tag in HTML5 for “headering” a page.




Another example of correctly using the section tag ( element ) is to think of it as somewhat of a containing element, but not enough to use it as a “div” ( division ) tag. The div tag is to be used to style the page, not to be used as any sort of content generator. The words “division” and “section” are closely related in the English language, but they do have their differences. This is where the hair-splitting comes in handy with HTML5. Use the div tag where you want to change presentation, use the section tag where you want to change content. There you pretty much have the whole CSS and HTML layout presented in a nutshell. Good webmasters separate content from presentation by using CSS3 and HTML5 in their respective manners.





Yet another example of using the section tag correctly is to connect it with heading tags. If a part of the page is going to have the “H1″ tag used, weigh it in your mind beforehand and see if you think it deserves a “chapter” ( section ) designation. If so, this would be a good place to use the section tag. The new HTML5 “article” tag may need to be used instead of a section tag, but the article tag is not the focus of this article. If you think about that last sentence it will help you realize when to use the section tag over an article tag. The W3C also makes this distinction in their standard. They say; “Authors are encouraged to use the article element instead of the section element when it would make sense to syndicate the contents of the element.” That makes sense since the internet is a connected place. Others may want to use or link to your work. Your site does have an RSS feed, right ?





The overarching rule is to think of HTML5 as a tool still under development. It is an unfinished work. The growing pains are here with us now, and are being smoothed out as each week goes by. It may even be formally ready for prime time before 2022.

107 comments - What do you think?  Posted by admin1  Date: Thursday, March 3, 2011

Categories: html5 advice, html5 tutorial   Tags:

Next Page »