Venu Madhav
Venu Madhav

Reputation: 433

What is the difference between internally div and semantic elements like section or article etc..?

What is the difference between internally for div and semantic elements like section or article etc.?

I found that internally div also have display: block; and semantic elements are also have (section, article etc.) display: block;, so internally both CSS is same, so semantics are just to present HTML code meaningfully or is there anything else internal behaviour?

I know that for div element there is no meaning but semantics elements have meaningful name.

Upvotes: 0

Views: 122

Answers (2)

puchmu
puchmu

Reputation: 109

I fully support @TFFX answer, I just want to add another aspect, namely Screenreaders for blind people. They work in a way that they not only read the contents (which is the only thing seeing users would normally see), but they also read the HTML-tags inside the body-tag. So for blind people it is easier to understand a webpage when there are different tags in use.

Upvotes: 2

TFFX
TFFX

Reputation: 190

Check out http://html5doctor.com/the-section-element/ they give a clear guide to html5.

section is a blob of content that you could store as an individual record in a database. It generally looks like this (and note that the heading goes inside the section element, not immediately before it):

<body>
...
  <section>
    <h2>level of heading = section nesting level</h2>
      rest of the content
  </section>
...
</body>

Upvotes: 0

Related Questions