What is semantic element in html and the examples? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

What is semantic element in html and the examples?

Semantic elements

4th May 2023, 2:20 PM
Vinome
Vinome - avatar
2 ответов
+ 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