HTML - Good Semantics

Good semantics in HTML refers to the practice of using HTML elements in a way that accurately conveys the meaning and structure of the content on a web page. Semantics in HTML are important because they not only help search engines and assistive technologies understand the content but also make the code more maintainable and readable for developers.

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laborum obcaecati.

Sample HTML5 semantic format below:


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Semantic HTML Example</title>
    <link rel="stylesheet" href="styles.css"> 
</head>
<body>
    <header>
        <h1>Welcome to a11ychecks.com website</h1>
        <nav aria-label="global">
            <ul>
                <li><a href="#about">About</a></li>
                <li><a href="#services">Services</a></li>
                <li><a href="#contact">Contact</a></li>
            </ul>
             <form role="search">
            
             </form>
        </nav>
    </header>
    <nav aria-label="main">
    </nav>
    <main>
        <section id="about">
            <h2>About Us</h2>
            <p>We are a passionate team of accessibility developers dedicated to creating amazing web experiences.</p>
        </section>

        <section id="services">
            <h2>Our Services</h2>
            <article>
                <h3>Web Accessibility Design</h3>
                <p>We create stunning and user-friendly web designs tailored to your needs.</p>
            </article>
            <article>
                <h3>Web Accessibility Development</h3>
                <p>Our developers build robust and scalable web applications using the latest technologies.</p>
            </article>
        </section>
    </main>

    <aside>
        <h2>Latest News</h2>
        <article>
            <h3>New Product Launch</h3>
            <p>Introducing our latest product that will revolutionize the accessibility industry.</p>
        </article>
    </aside>

    <footer>
        <p> @ 2023 a11ychecks.com Website. All rights reserved.</p>
    </footer>
</body>
</html>

HTML5 Sectioning elements

Sample ARIA Landmark roles format below:



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ARIA Landmark role</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div role="banner">
        <h1>Welcome to a11ychecks.com website</h1>
        <nav aria-label="global">
        <div role="navigation">
            <ul>
                <li><a href="#about" role="menuitem">About Us</a></li>
                <li><a href="#services" role="menuitem">Our Services</a></li>
                <li><a href="#contact" role="menuitem">Contact Us</a></li>
            </ul>
             <form role="search">
            
             </form>
        </div>
    </div>

    <div role="main">
        <section id="about" role="region" aria-label="About Us">
            <h2>About Us</h2>
            <p>We are committed to creating accessible websites for everyone.</p>
        </section>

        <section id="services" role="region" aria-label="Our Services">
            <h2>Our Services</h2>
            <div role="article">
                <h3>Web Design</h3>
                <p>We create stunning and accessible web designs tailored to your needs.</p>
            </div>
            <div role="article">
                <h3>Web Development</h3>
                <p>Our developers build accessible web applications using the latest technologies.</p>
            </div>
        </section>
    </div>

    <div role="complementary">
        <h2>Latest News</h2>
        <div role="article">
            <h3>New Product Launch</h3>
            <p>Introducing our latest product that is designed with accessibility in mind.</p>
        </div>
    </div>

    <div role="contentinfo">
        <p> @ 2023 a11ychecks.com. All rights reserved.</p>
    </div>
</body>
</html>



ARIA Landmark roles