DEV Community

Alo Ndubuisi
Alo Ndubuisi

Posted on

A BEGINNERS APPROACH TO USING HTML SEMANTIC TAGS

A Beginner’s Approach to Using HTML Semantic Tags
Writing clean and meaningful HTML is more than just a good habit—it’s the foundation of accessible, SEO-friendly, and well-structured web pages.

👋 Introduction
If you're just starting out in web development, chances are you've come across terms like

, , and other elements that seem to do everything. But have you ever wondered what makes a website accessible, search-engine friendly, and easier to maintain?

Answer: Semantic HTML.

In this article, we’ll explore what semantic tags are, why they matter, and how beginners can confidently start using them in real-world projects.
🔍 What Are Semantic Tags?
Semantic HTML refers to the use of HTML tags that clearly describe their meaning—both to the browser and to the developer.

For example:
✅ defines a page or section header.
✅ represents a standalone piece of content.
✅ defines a footer for a section or the entire page.

Compare that with:

, which works, but doesn’t tell the browser or screen readers much about its purpose.
🎯 Why Use Semantic Tags?
✅ 1. Improved Accessibility
Screen readers and assistive technologies can better understand the structure of a semantic page.
✅ 2. Better SEO
Search engines prioritize well-structured content. Semantic tags give context to your page, helping bots index your site more effectively.
✅ 3. Clean and Maintainable Code
Semantic tags make your code more readable for you and your team.
🧱 Common Semantic Tags Every Beginner Should Know
Tag

For images and their captions Highlights or emphasizes text 💡 Real Example: Semantic vs Non-Semantic ❌ Non-Semantic HTML:
  • Home
  • About
✅ Semantic HTML:
  • Home
  • About

🧭 Tips for Beginners

  1. Don’t Overuse and – Use them meaningfully.

  2. Validate Your HTML – Use W3C Validator to check your code.

  3. Use ARIA Roles When Needed – But don’t overdo it; semantic tags already carry meaning.

  4. Practice Refactoring – Replace divs and spans in older code with semantic tags where appropriate.

Final Thoughts
Learning to use HTML semantic elements early in your journey will help you write cleaner, more professional, and future-proof code. Whether you're building a portfolio, a blog, or a business site, semantic HTML is your friend.

📚 Helpful Resources
• HTML5 Semantic Elements on MDN: https://developer.mozilla.org/en-US/docs/Glossary/Semantics
• W3C HTML Specification: https://www.w3.org/TR/html/
• HTML Validator: https://validator.w3.org/

Description Top section of a page or section Navigation links Main content of the page A distinct section of content A self-contained block (like a blog post) Sidebar or additional info Bottom of page or section &

Top comments (0)