DEV Community

Kamrul Hasan
Kamrul Hasan

Posted on

What do you mean by semantic tag? Give Examples.

In any language, it is essential to understand the meaning of words during communication. And if this is computer communication then it becomes more critical. So HTML5 provides more semantic elements which make easy understanding of the code. The HTML semantics refers to the tags that provide meaning to an HTML page rather than just presentation. It makes HTML more comprehensible by better defining the different sections and layout of web pages.

Some semantic tag Examples:

header: Defines a header for a web page.
section: defines a section in a web page.
article: This element contains the main part, containing information about the web page.
aside: Sidebar in a document.
footer: footer for a document.

Top comments (2)

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

Most HTML tags are semantic - that is essentially the whole point of HTML - to mark up text to give it more meaning so that it can be more easily parsed by a machine. HTML5 just added a few more tags on top of those already there.

More, random examples:

body: The body of the document
p: Paragraph
ul: Unordered list
dl: Description list
button: A button
input: An element for receiving input
form: A form
table: A table of data

Etc.

Collapse
 
kamruldev profile image
Kamrul Hasan

Yeah, I just tried to give basic idea . Thanks for your comment.