Semantics - <div>


#1

Hi guys,

I am a little embarrassed by this text:

Some of the tags we have used, such as <div>, are called non-semantic tags. This means that they do not describe the content that is inside of them. However, many tags are used to describe the content that they surround, which helps us modify and style our content later. These are called semantic tags and <nav> is one of them!

Why <div> is referred to as non-semantic when it is possible to modify and reshape?

Thanks a lot.


#2

None semantic tags do not describe (or hint at) what they contain or how it relates to the document. <div> is one example. <ul>, <ol>, <li>, <blockquote>, are others.

Semantic tags giving meaning to what they contain.

<nav></nav>

tells the reader (and user agent) to expect to find navigation links.

<header></header>
<footer></footer>

describe two significant areas in the document, the header, where one will expect to find main headings, page and site related information; and the footer where one would expect to find copyright information, boilerplate site and organization links and perhaps any disclaimers.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.