If the purpose of the <article>, <section>, and <aside> tags are to replace <div>, can <div> and <class> still be used in html5? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 1

If the purpose of the <article>, <section>, and <aside> tags are to replace <div>, can <div> and <class> still be used in html5?

Div tags

14th Jun 2020, 1:27 PM
Joan Ojiako
Joan Ojiako - avatar
3 Respuestas
+ 1
Yes yes why not you can . Infact using css grid will also be good .
14th Jun 2020, 2:05 PM
Ayush Kumar
Ayush Kumar - avatar
+ 1
Thanks a lotūüėĄ
17th Jun 2020, 5:53 PM
Joan Ojiako
Joan Ojiako - avatar
0
Hi Joan Ojiako , Indeed article,aside ... are semantic tag.Their use is important for accessibility reasons and for browser and search engines by adding meanings so your html is interpreted better but div is still relevant in some cases as a generic container. For classes , you can give same classes to several elements, so for exemple your aside and your nav can have the same class which will define in the CSS the color of text and font family only for those elements. Or you can have several section and aside in your html also, so a same class for each would be normal.
14th Jun 2020, 2:59 PM
EmmanueLZ.
EmmanueLZ. - avatar