Answer the question
In order to leave comments, you need to log in
Header, footer,... and div tags - is there a difference?
It's no secret that HTML5 introduced a number of "semantic" tags: header, footer, article, aside - is there any difference from divs?
Do I understand correctly that the appropriate use of these tags makes the html code easier to read, more understandable, functionally the same - all the same can be done on divs?
Are there any other pros/cons of using these tags over divs? (maybe search engines treat such pages better/worse, maybe there are nuances in browser support,...)
Answer the question
In order to leave comments, you need to log in
maybe search engines treat such pages better/worse
As it was correctly said, the reason is in the semantics of the code. In fact, roughly speaking, the entire page can be laid out even on a span if you give them the display: block parameter; however, such layout will not satisfy semantics. Search engines read the site by tags, and if all the div blocks for it are exactly the same, then the header, footer, nav, aside, etc. tags. make it immediately clear what kind of part of the page it is (the nesting of tags also matters, the same header can be used not only for the header of the entire site). Moreover, Google gives less priority to sites that are not laid out with semantic html5, so this is also SEO
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question