+ 11
As I understand it: 1. Usability - it seems to be easier to work with footer,header, section etc than with thousands of divs. 2. Different semantic elements are interpreted differently by searching engines Semantic elements are good standard today(I might miss something, but I'm not a pro😆😆)
2nd Oct 2017, 4:37 PM
Euhenia Zhdanovich
Euhenia Zhdanovich - avatar
+ 6
MDN docs. 😉 For example, the <h1> element is a semantic element, which gives the text it wraps around the role (or meaning) of "a top level heading on your page." <h1>This is a top level heading</h1> By default, it will be given a large font size to make it look like a heading (although you could style it to look like anything you wanted), but more importantly its semantic value will be used in multiple ways, for example search engines will consider its contents as important keywords to influence the page's search rankings (see SEO), and screen readers can use it as a signpost to help visually impaired users navigate a page. On the other hand, you could make any element look like a top level heading. Consider the following: <span style="font-size: 32px; margin: 21px 0;">Is this a top level heading?</span> This will render to look like a top level heading, but it has no semantic value, so it will not get any extra benefits as described above. It is therefore a good idea to use the right HTML element for the right job.
2nd Oct 2017, 9:03 PM
Iman Gharaee
Iman Gharaee - avatar