<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Estherngaire</title>
    <description>The latest articles on DEV Community by Estherngaire (@estherngaire).</description>
    <link>https://dev.to/estherngaire</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3462944%2Fada6bb9b-122a-49f3-906e-f1d7bac4bb92.png</url>
      <title>DEV Community: Estherngaire</title>
      <link>https://dev.to/estherngaire</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/estherngaire"/>
    <language>en</language>
    <item>
      <title>Semantic HTML</title>
      <dc:creator>Estherngaire</dc:creator>
      <pubDate>Mon, 01 Sep 2025 20:07:08 +0000</pubDate>
      <link>https://dev.to/estherngaire/semantic-html-4108</link>
      <guid>https://dev.to/estherngaire/semantic-html-4108</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Semantic HTML is a way of writing code that helps computers and people understand the meaning and the structure of a web page, making it easier for search engines and assistive technologies to understand. Semantic HTML helps improve accessibility, better SEO, enhance user experience, improve code readability, improve performance etc. It uses special HTML tags that give the meaning of the content and help computers and people understand what each section  of the page is for. In this article we’ll dive deeper at how semantic HTML helps improve SEO and accessibility, it’s comparison to non-semantic, benefits of using semantic and how to implement it effectively.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Semantic HTML&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Semantic HTML means HTML that carries meaning tags that describe their purpose to the browser and to developers, such as &amp;lt;header&amp;gt;,&amp;lt;main&amp;gt;,&amp;lt;section&amp;gt;,&amp;lt;article&amp;gt; and &amp;lt;Footer&amp;gt;.Historically ,websites relied on &amp;lt;div&amp;gt; and &amp;lt;span&amp;gt;. Unlike &amp;lt;div&amp;gt; and &amp;lt;span&amp;gt; these tags give structure and provide context for browsers, search engines and assistive machines. Example;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Estherngaire" rel="noopener noreferrer"&gt;
        Estherngaire
      &lt;/a&gt; / &lt;a href="https://github.com/Estherngaire/Non-Semantic" rel="noopener noreferrer"&gt;
        Non-Semantic
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Non-Semantic&lt;/h1&gt;

&lt;/div&gt;
 
    
    
    
      &lt;div&gt;
          &lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Article&lt;/h1&gt;

&lt;/div&gt;
      &lt;/div&gt;
     &lt;div&gt;
&lt;p&gt;In Sematic the structure is clear explaining every section but Non Semantic doesn’t provide clear meaning to the structure making it difficult for screen readers and search engines to understand.&lt;/p&gt;
     &lt;/div&gt;
     &lt;div&gt;
        &lt;p&gt;@ 2025 My website&lt;/p&gt;
     &lt;/div&gt;
     
    
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Estherngaire/Non-Semantic" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;



&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Estherngaire" rel="noopener noreferrer"&gt;
        Estherngaire
      &lt;/a&gt; / &lt;a href="https://github.com/Estherngaire/Semantic-HTML" rel="noopener noreferrer"&gt;
        Semantic-HTML
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
  


    
        
            &lt;a href="https://github.com/Estherngaire/Semantic-HTML/link" rel="noopener noreferrer"&gt;Home&lt;/a&gt;
        
    
  
    &lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Semantic is clearer&lt;/h1&gt;

&lt;/div&gt;
      &lt;p&gt;Semantic html gives structure and provide context for browsers, search engines and assistive machines.The code is shorter, clearer and tells the search engine that the content is the page headers.&lt;/p&gt;
    
    


&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Estherngaire/Semantic-HTML" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;In the Semantic version, the code is shorter, clearer and tells the search engine that the content is the page headers whereas Non-Semantic doesn’t provide clear meaning to the structure making it difficult for screen readers and search engines to understand.&amp;lt;div&amp;gt; and &amp;lt;span&amp;gt;don't give any meaning. Semantic HTML has multiple benefits like;&lt;/p&gt;

&lt;p&gt;*Improved accessibility&lt;br&gt;
*Better Search engine Optimization&lt;br&gt;
*Easier Maintenance and updates &lt;br&gt;
*Improve code readability &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical SEO benefits of Semantic HTML&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One  of the most effective benefit of using semantic HTML is it improves SEO. These Search engines analyze the page structure  using tags like &amp;lt;header&amp;gt;, &amp;lt;nav&amp;gt; ,&amp;lt;article&amp;gt; and &amp;lt;section&amp;gt; making it clear which part of the page is important.An example of a html structure;&lt;/p&gt;

&lt;p&gt;&amp;lt;html&amp;gt;&lt;br&gt;
  &amp;lt;head&amp;gt;&lt;br&gt;
    &amp;lt;title&amp;gt;Semantic&amp;lt;&amp;lt;title&amp;gt;&lt;br&gt;
  &amp;gt;/head&amp;gt;&lt;br&gt;
 &amp;lt;body&amp;gt;&lt;br&gt;
    &amp;lt;header&amp;gt;&lt;br&gt;
        &amp;lt;nav&amp;gt;&lt;br&gt;
            &amp;lt;a href="link"&amp;gt;Home&amp;lt;/a&amp;gt;&lt;br&gt;
        &amp;lt;/nav&amp;gt;&lt;br&gt;
    &amp;lt;/header&amp;gt;&lt;br&gt;
  &amp;lt;main&amp;gt;&lt;br&gt;
    &amp;lt;h1&amp;gt;Semantic is clearer &amp;lt;/h1&amp;gt;&lt;br&gt;
  &amp;lt;/main&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;br&gt;
Each tag gives a meaning to each section the code;&lt;br&gt;
&amp;lt;header&amp;gt; Defines the sections of a document&lt;br&gt;
&amp;lt;nav&amp;gt; a set of navigation links &lt;br&gt;
&amp;lt;main&amp;gt; Explains the main content of a document&lt;br&gt;
&amp;lt;section&amp;gt;a self contained set of information, contacts, or any other secondary information&lt;br&gt;
&amp;lt;aside&amp;gt; Defines content that is related to the main content&lt;br&gt;
&amp;lt;footer&amp;gt; provides additional information about a website&lt;/p&gt;

&lt;p&gt;This structure helps improve indexing and visibility. In measurable SEO, semantic HTML contributes to improved rankings, Rich snippet and performance gains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accessibility and Semantic HTML&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Accessibility is ensuring all users, including the once with disability, can have access to a website freely. This is achievable with Semantic HTML because it creates landmarks and structure that assistive technologies can understand.Here are ways that Semantic HTML contributes:&lt;/p&gt;

&lt;p&gt;• Provides automatic Accessible Rich Internet Application roles (ARIA).ARIA provides additional information about elements such as property,role and state;Example of ARIA attributes:&lt;/p&gt;

&lt;p&gt;aria-label:Provides a text description&lt;br&gt;
aria-labelledby:References the id of an element that provides text description.&lt;br&gt;
aria-describedby:the id that provides additional information.&lt;br&gt;
role:Defines the role of an item,such as button or navigation region&lt;br&gt;
aria-live:indicates that an element will be updated&lt;/p&gt;

&lt;p&gt;This reduces the need for adding role attributes manually, minimizing redundancy and error&lt;/p&gt;

&lt;p&gt;• Creates landmarks for screen readers to announce sections: Elements like &amp;lt;header&amp;gt;,&amp;lt;nav&amp;gt;, &amp;lt;main&amp;gt;, and &amp;lt;footer&amp;gt; act as landmarks. Screen readers can easily read through these without listening to every element.&lt;/p&gt;

&lt;p&gt;• Heading hierarchy; proper heading order &amp;lt;h1&amp;gt; to &amp;lt;h6&amp;gt; helps  assistive technologies help users go through headings like a table of content.&lt;/p&gt;

&lt;p&gt;• Enhanced user experience:With the help of tags,screen readers provide accurate and helpful feedback,improving overall user experience&lt;/p&gt;

&lt;p&gt;• Improved Navigation:Screen readers can provide shortcuts to navigate between elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WCAG&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Web Content Accessibility Guidelines are like rulebooks  that ensure people with disability can also use a website.Its organized into four principals.(POUR)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Perceivable:Information must be presented in ways users understand like providing alternative  text for images,using proper headings &amp;lt;h1&amp;gt;-&amp;lt;h6&amp;gt;&lt;/li&gt;
&lt;li&gt;Operable:Users must be able to operate navigation&lt;/li&gt;
&lt;li&gt;Understandable:writing clear instruction and avoiding complex languages helps users understand easily.&lt;/li&gt;
&lt;li&gt;Robust:Content should work in all devices and assistive technologies.like testing the code on multiple browsers,Ensuring ARIA are used correctly and using valid semantic html so screen readers would interpret easily&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Testing Methodologies&lt;/strong&gt;&lt;br&gt;
 Testing methodologies is basically testing the code to ensure that its accessible to all users.&lt;br&gt;
A. Automated testing:Using tools like google light house,Wave and axe Devtools to identify any errors&lt;br&gt;
b. User-centered Evaluations:Involving users with disabilities to test to provide their feedback&lt;br&gt;
c. Manual testing: Human review to identify the complex issue that a tool might have missed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-world Implementation Scenarios&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When writing an article or blog post,&amp;lt;article&amp;gt;,&amp;lt;section&amp;gt; and &amp;lt;aside&amp;gt; are used to separate post,advertisement or related content.&lt;/li&gt;
&lt;li&gt;Cooperate sites rely on &amp;lt;header&amp;gt;,&amp;lt;nav&amp;gt;and &amp;lt;footer&amp;gt; to create consistent layout across pages while making navigations accessible to screen readers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Best practices and common Pitfalls&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Best practices&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; One &amp;lt;main&amp;gt; per page ;helps search engines and assistive technologies focus on the main content&lt;/li&gt;
&lt;li&gt; Follow a proper heading hierachy&amp;lt;h1&amp;gt; for main title &amp;lt;h2&amp;gt;,&amp;lt;h3&amp;gt;,...&lt;/li&gt;
&lt;li&gt; Using Semantic elements where possible; For clean and readable code&lt;/li&gt;
&lt;li&gt; Use &amp;lt;article&amp;gt; for shareable content like blog posts&lt;/li&gt;
&lt;li&gt; Provide alternative text for images with &amp;lt;img alt=".."&amp;gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Common Pitfalls&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Multiple &amp;lt;main&amp;gt; elements. This makes it hard for assistive technologies to focus on the core content&lt;/li&gt;
&lt;li&gt; Overusing &amp;lt;div&amp;gt; element instead of using semantic tags.&lt;/li&gt;
&lt;li&gt; Skipping heading levels. Follow the way they are. Don’t jump from &amp;lt;h1&amp;gt; to &amp;lt;h6&amp;gt;&lt;/li&gt;
&lt;li&gt; Redundant ARIA roles. &amp;lt;nav role=”navigation”&amp;gt; is unnecessary - &amp;lt;nav&amp;gt; already provides this role&lt;/li&gt;
&lt;li&gt; Wrong placement of tags example &amp;lt;title&amp;gt; inside of &amp;lt;header&amp;gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Technical testing and validation&lt;/strong&gt;&lt;br&gt;
 They are ways that check html codes to make sure they follow valid HTML rules.Think of it like proofreading and spell-checking for errors.Examples;&lt;br&gt;
A. Validators:tool used is W3C validator.It checks if your html follows the rules&lt;br&gt;
b. Accessibility tools: tools used are Light house,Wave,axe.This tools show how people and assistive technologies are experiencing the page&lt;br&gt;
c. Browser Devtools like chrome/firefox,brave to see if there is errors or something missing&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Semantic HTML is a game changer for web development, with it offering improved accessibility, easier maintenance and better SEO. With the help of semantic HTML elements, one can create a website that’s readable, user friendly and structured. And as the web continues to grow, so will the importance of Semantic HTML making it an essential skill for any developer looking to create a website that’s accessible and functional.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>a11y</category>
      <category>html</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
