DEV Community

Ansub Khan
Ansub Khan

Posted on

1

What is Semantic HTML?

What is Semantic HTML?

  • Semantic HTML is a coding style where elements which we use actually have some meaning. Semantic simply put means a logic that has an actual meaning hence comes the name: Semantic HTML, an HTML which is a logic and also has a meaning.

  • This practice is good for Search Engine Optimization (SEO)

  • it is also good for accessibility, especially for visually impaired people who rely on browser speech, screen readers to interpret page content clearly.
    Here is how a non-semantic HTML looks like:

IMG_0135.jpg

here is how a semantic HTML looks like

IMG_0136.jpg

Remember:

  • to write semantic HTML, avoid using div tags everywhere, instead use elements like header, nav, section, article, aside, footer.

  • all these elements are built with a specific purpose - they are good for SEO too.

In Simple Words:

non-semantic elements: <div> and <span> tells nothing about its content.

Semantic Elements: <form>, <table>and <article> -> clearly defines its content.

if you want any help with the Semantic HTML or any other query then please contact me on my Twitter

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay