HTML 5

Photon

Member
I don't really get the point of <section> and <article>.
What is it that those two can do that <div> can't? What's the point of even having them if <div> is efficient enough?

I'm a little lost about this.
 
I don't really get the point of <section> and <article>.
What is it that those two can do that <div> can't? What's the point of even having them if <div> is efficient enough?

I'm a little lost about this.

It is all about synaptic markup... with html and <div>'s it was exsactly the same to the end user, but to robotic markup reading it would be hard to identify the main content etc... because one designer may do <div id="article"> but another might to <div id="asec"> and another may even just do <div class="block grey round">

With <Section> and <Article> you are better laying out your page content. This will make things easier for robotic reading... Now this has many uses going forward, starting firstly with search engines and the likes better understanding the content. but looking further native desktop and mobile apps may be able to easily pull the relevant information from a site written correctly in HTML5 without any additional changes... For example if you look at http://mycoffeecupisempty.com/article/24/html5-center-content/ a desktop news reader would be able to instantly see which part of that site is the main content (Excluding all navigation headers etc)...
 
I don't really get the point of <section> and <article>.
What is it that those two can do that <div> can't?
Tell the web browser, screen reading software (for blind and visually impaired users), search engine spider, and any number of other browsers I can't even imagine, which parts of the page contain what information.

For instance, if I am a search engine or screen reading software, how important is it that I read the contents of every user's signature, or their user title, or all the navigation buttons at the top, or various buttons and links to Like or Report a post? Probably not that important. But each post and the title of each post are crucially important.

Semantic tags let you prioritize content and tell the person/computer reading your site which parts are important and which are less important.
 
I don't really get the point of <section> and <article>
For layout, they do nothing. Don't worry about it too much to be perfectly honest... as mentioned above already, its only about semantics and Feldon nailed it as its about third party interaction with your site to determine what area of the page is what.

If you think about a navigation, apart from reading the links to the primary content area, Google can dismiss everything between <nav> & </nav> for content ranking purposes, and only focus on what is actual content tags. Small devices can rearrange entire layouts with CSS by shifting priority of each defined area... etc etc. It will also make writing CSS that little easier, because instead of having to create identifiers for each area, you will be able to just use the identifier tag that HTML5 provides, thus also denoting immediately in the CSS what area it belongs to.

At this point in time though... it does really little overall apart from CSS3 and its cool tricks.
 
Top Bottom