0

I am developing the HTML5 application in which I am using the following tags.

<header>
<selction>
<article>
<footer>

I am wondering that what are the actual use of that tags in HTML5 application. we already use the <div> tag in our traditional application which is also working same as above given tags so, what actually the better use for above tags.

Is there any different between <div> and html5 tags?

or it is just a logical element for grouping the elements in application.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
Ashwin Parmar
  • 3,025
  • 3
  • 26
  • 42

2 Answers2

4

the HTML5 semantic tags like section, article etc describes its meaning to both the browser and the developer.

They work no different from div's but are more meaningful than divs all over a page which can get messy.

So i would have section in my site inside these sections if i needed to break it down i would add articles inside. Or things like aside lets you know its gonna be a sidebar rather than a plain old div.

Hope this makes sense

  • My question is that if i use `
    ` and `
    ` will it automatically stay at header and footer means at bottom? or we should add style to looks like this.
    – Ashwin Parmar Sep 29 '13 at 13:21
  • 1
    if you use header you would target it with the css selector header and style it to stay at top or where ever. same for footer. So to be clear header tag doesn't style it you need to style it. Just easier semantically than having a div with class header. saves you a fullstop in css – Adam 'Sacki' Sackfield Sep 29 '13 at 13:26
0

here's two link answer is they are just meant to distinguish between different tags

Header

footer w3

if you want to understand the difference try firebugging in the try it editor or use fiddle

Anobik
  • 4,841
  • 2
  • 17
  • 32