DEV Community

Shajibul Alam Shihab
Shajibul Alam Shihab

Posted on

Semantic HTML

Semantic HTML

What is Semantic HTML?

Semantic HTML uses HTML elements that convey meaning, both to developers and browsers. Instead of using generic elements like <div> and <span>, semantic tags like <header>, <footer>, and <section> clarify the structure of the content.

Why It Matters: The Evolution of HTML

Early HTML (Pre-HTML5):

  • Relied on <div> and <span> for layout.
  • Made web pages difficult to read for both humans and machines.

Introduction of HTML5 (2014):

  • Added semantic elements like <header>, <footer>, <article>, etc.
  • Promoted cleaner and more accessible code.
  • Improved machine readability and accessibility for users.

Benefits of Semantic HTML

Accessibility

  • Assistive technologies like screen readers understand document structure with semantic tags.
  • Tags help screen readers identify sections, enhancing the experience for users with disabilities.

SEO (Search Engine Optimization)

  • Semantic tags help search engines interpret content structure and importance.
  • Tags like <article> and <header> improve content hierarchy and rankings.
  • <main>, <nav>, <header>, and other elements enhance context and relevance for search engines.

Clean Code Structure

  • Semantic elements organize code logically, making it easier to read and maintain. Developers can quickly identify content sections, reducing coding errors and improving collaboration across teams.

References or related articles:

  1. https://developer.mozilla.org/en-US/docs/Glossary/Semantics
  2. https://www.w3schools.com/html/html5_semantic_elements.asp

Thank You

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more