semantic element clearly describes its meaning to both the browser and the developer.Hence Semantics defines the meaning of words and phrases,
Semantic elements= elements with a meaning.
In HTML4 we have seen <div>, <span> etc. are which are non-semantic elements. They don't tell anything about its content.
But <form>, <table>, and <article> are semantic elements because they clearly define their content.
HTML5 semantic elements are supported by all major browsers.
Tags | Works for |
---|---|
<article> | Defines an article |
<aside> | Defines content aside from the page content |
<details> | Defines additional details that the user can view or hide |
<figcaption> | Defines a caption for a <figure> element |
<figure> | Specifies self-contained content, like illustrations, diagrams, photos, code listings, etc. |
<footer> | Defines a footer for a document or section |
<header> | Specifies a header for a document or section |
<main> | Defines marked/highlighted text |
<mark> | Defines marked/highlighted text |
<nav> | Defines navigation links |
<section> | Defines a section in a document |
<summary> | Defines a visible heading for a <details> element |
<time> | Defines a date/time |
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions