What is semantic element in html and the examples? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

What is semantic element in html and the examples?

Semantic elements

4th May 2023, 2:20 PM
Vinome
Vinome - avatar
2 Respostas
+ 5
Vinome Semantic Elements : Semantic elements are elements which describes its purpose or usage. Header , footer, nav, form, a, img, table etc are semantic elements. Because this elements itself describes its purpose. Exaple : Header elements describes that it should be used as an header of the webpage and nav element is for navigation. Non-semantic elements : These elements purpose depends on the user or it just doesnā€™t not have any default purpose like semantic elements. Div, span etc are some non semantic elements. Here div and span elements itself doesnā€™t provide the details like semantic elements. You can use this elements as you wish. Its up to you. Examples of non-semantic elements: <div> and <span> - Tells nothing about its content. Best guide.. https://www.w3schools.com/html/html5_semantic_elements.asp#:~:text=What%20are%20Semantic%20Elements%3F,%3E%20%2D%20Clearly%20defines%20its%20content.
4th May 2023, 2:28 PM
Darpan kesharwanišŸ‡®šŸ‡³[InactivešŸ“š]
Darpan kesharwanišŸ‡®šŸ‡³[InactivešŸ“š] - avatar
+ 3
Semantic tags create meaningful and easy to read elements, Ex: we can creat a footer or header with div tag but with header and footer semantic tags it makes more sense.
4th May 2023, 2:36 PM
Yasin Rahnaward
Yasin Rahnaward - avatar