+ 1
Div vs Section vs Article
<div>, <section>, and <article>. What's the difference between these tags? Because I feel like they're essentially doing the same thing. I want to know when do I use either of them? I only kinda understand where to use <header> and <footer>. P.S. Also are there any other "generic content containers" or whatever it's called?
5 Respostas
+ 2
Search Engine Optimization
https://developer.mozilla.org/en-US/docs/Glossary/SEO
Custom Element
https://code.sololearn.com/WpM7Lm6fFDgI/?ref=app
+ 1
Net-clicks But how is it better than just regular divs?
+ 1
it's not for seo, sorry
should be aria instead
Accessible Rich Internet Applications (ARIA)
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA
assistive technologies interprets semantic elements, so semantic elements are always preferred.
0
In the last version of html (4)<div> was only, but they are new tags like <article> <section>, and all containers. If you have articles on the site, such as the news site, use <article> inside and and put a section inside it. for the title of the article and another for the picture and a third for the author ...