Main Landmark: The Express Lane to Your Content

6 min read

What is the Main Landmark?

Imagine walking into a large department store where you need to find one specific item. Without clear signage directing you to different departments, you'd waste time wandering through areas that don't contain what you're looking for. The main landmark works similarly on websites—it's like a clearly marked sign that says "Primary Content This Way," helping users bypass navigation menus, sidebars, and other peripheral content to get straight to what they came for.

The main landmark is an HTML element (the <main> tag) or ARIA role (role="main") that identifies the primary content area of a webpage. This landmark helps screen reader users and other assistive technologies quickly jump to the most important content without having to navigate through all the surrounding elements.

Main Landmark Implementation:

  • Properly Implemented: One main landmark per page that contains the primary content and is correctly positioned in the document structure
  • Partially Implemented: Main landmark present but may be incorrectly placed, contain wrong content, or have multiple instances
  • Missing: No main landmark present, forcing users to manually navigate through all page content to find what they need

Why the Main Landmark Matters for User Experience

The main landmark serves several important functions that significantly improve website usability:

  • Rapid Content Access: Screen reader users can press a single key (typically 'M') to jump directly to the main content, bypassing navigation menus, ads, and other secondary content.
  • Cognitive Load Reduction: By clearly marking the primary content area, you help all users understand the page structure and focus on what matters most.
  • Skip Link Destination: The main landmark provides a natural target for "skip to main content" links, which help keyboard users bypass repetitive navigation.
  • Screen Reader Efficiency: Users of assistive technologies can orient themselves quickly by understanding which content is primary versus supplementary.
  • SEO Context: Search engines can better understand which content is most important on your page, potentially improving content relevance signals.
  • Voice Navigation: Users who navigate with voice commands can say "go to main content" when landmarks are properly implemented.

Without a main landmark, users must navigate through every element on the page sequentially, which can be time-consuming and frustrating, especially on pages with complex headers, navigation menus, or multiple sidebars.

The Navigation Tax

Every page without a proper main landmark forces assistive technology users to pay a "navigation tax"—the time and effort required to manually work through all the preliminary content to reach what they actually came to read or interact with. This tax accumulates across every page visit, creating significant friction in the user experience.

How to Implement the Main Landmark Correctly

Proper main landmark implementation follows specific patterns that ensure maximum benefit for users:

1. Use the HTML5 Main Element (Preferred Method)

The HTML5 <main> element is the standard way to mark your primary content area.

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Page Title</title>
</head>
<body>
  <header>
    <nav>
      <!-- Site navigation -->
    </nav>
  </header>
  
  <main>
    <h1>Page Heading</h1>
    <p>This is the primary content of the page...</p>
    
    <article>
      <h2>Article Title</h2>
      <p>Article content...</p>
    </article>
    
    <section>
      <h2>Section Title</h2>
      <p>Section content...</p>
    </section>
  </main>
  
  <aside>
    <!-- Sidebar content -->
  </aside>
  
  <footer>
    <!-- Footer content -->
  </footer>
</body>
</html>

2. Alternative: Using ARIA Role

If you can't use the HTML5 main element, you can add role="main" to any container element.

<!-- When you need to use a div instead of main element -->
<div role="main">
  <h1>Page Heading</h1>
  <p>Primary content goes here...</p>
</div>

<!-- Common in legacy systems or when working with existing HTML -->
<div id="content" role="main">
  <article>
    <h1>Article Title</h1>
    <p>Article content...</p>
  </article>
</div>

Note: Don't use both the main element and role="main" together—the HTML5 element automatically has the main role.

3. Integration with Skip Links

The main landmark works perfectly with skip navigation links, providing keyboard users a way to bypass repetitive content.

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Page Title</title>
  <style>
    .skip-link {
      position: absolute;
      top: -40px;
      left: 6px;
      background: #000;
      color: #fff;
      padding: 8px;
      text-decoration: none;
      border-radius: 0 0 4px 4px;
    }
    .skip-link:focus {
      top: 0;
    }
  </style>
</head>
<body>
  <a href="#main-content" class="skip-link">Skip to main content</a>
  
  <header>
    <nav>
      <!-- Complex navigation menu -->
    </nav>
  </header>
  
  <main id="main-content">
    <h1>Welcome to Our Site</h1>
    <p>This is the main content...</p>
  </main>
</body>
</html>

4. Single Page Applications (SPAs)

In SPAs, manage focus properly when content changes to maintain the main landmark's effectiveness.

// React example
function App() {
  const mainRef = useRef(null);
  
  // Focus main content when route changes
  useEffect(() => {
    if (mainRef.current) {
      mainRef.current.focus();
    }
  }, [location.pathname]);
  
  return (
    <div>
      <nav>
        {/* Navigation */}
      </nav>
      
      <main ref={mainRef} tabIndex="-1">
        <Routes>
          <Route path="/" element={<HomePage />} />
          <Route path="/about" element={<AboutPage />} />
        </Routes>
      </main>
    </div>
  );
}

// Vue.js example
export default {
  mounted() {
    this.$refs.mainContent.focus();
  },
  template: `
    <div>
      <nav>
        <!-- Navigation -->
      </nav>
      
      <main ref="mainContent" tabindex="-1">
        <router-view />
      </main>
    </div>
  `
}

What Should (and Shouldn't) Go in the Main Landmark

Understanding what content belongs in the main landmark is crucial for proper implementation:

Content That Belongs in Main:

  • Primary page content: The main article, blog post, product information, or page-specific content
  • Page headings: The h1 and main content headings
  • Content sections: Articles, sections, and other content blocks that represent the page's primary purpose
  • Interactive elements: Forms, buttons, and other elements that are central to the page's function
  • Content-related media: Images, videos, and other media that support the main content

Content That Should NOT Go in Main:

  • Site navigation: Primary navigation menus, breadcrumbs, or site-wide links
  • Site header/banner: Logo, site title, or header content that appears on multiple pages
  • Sidebar content: Related links, advertisements, or supplementary information
  • Footer content: Copyright, contact information, or site-wide footer links
  • Search functionality: Site-wide search boxes (unless search is the main purpose of the page)
<!-- Good example of main landmark content -->
<header>
  <h1>Site Name</h1>
  <nav>Site Navigation</nav>
</header>

<main>
  <h1>How to Grow Tomatoes</h1> <!-- Page-specific heading -->
  
  <article>
    <h2>Choosing the Right Variety</h2>
    <p>When selecting tomato varieties...</p>
    
    <h2>Soil Preparation</h2>
    <p>Tomatoes thrive in well-drained soil...</p>
  </article>
  
  <section>
    <h2>Related Tools</h2>
    <p>These gardening tools will help...</p>
  </section>
</main>

<aside>
  <h2>Popular Articles</h2>
  <!-- Related content sidebar -->
</aside>

<footer>
  <p>© 2025 Gardening Site</p>
</footer>

Common Main Landmark Mistakes and How to Fix Them

Several common implementation mistakes can undermine the effectiveness of the main landmark:

Problem: Multiple Main Landmarks on One Page

What's happening: Having more than one main landmark on a single page, which confuses assistive technologies and users.

Simple solution: Use only one main landmark per page. If you have multiple content areas, consider using section or article elements instead:

<!-- Bad: Multiple main landmarks -->
<main>
  <h1>News</h1>
  <p>Latest news content...</p>
</main>

<main>
  <h1>Sports</h1>
  <p>Sports content...</p>
</main>

<!-- Good: One main landmark with multiple sections -->
<main>
  <section>
    <h1>News</h1>
    <p>Latest news content...</p>
  </section>
  
  <section>
    <h1>Sports</h1>
    <p>Sports content...</p>
  </section>
</main>

Problem: Main Landmark Contains Navigation or Site-Wide Content

What's happening: Including navigation menus, site headers, or other non-primary content within the main landmark.

Simple solution: Keep navigation and site-wide content outside the main landmark:

<!-- Bad: Navigation inside main -->
<main>
  <nav>
    <a href="/">Home</a>
    <a href="/about">About</a>
  </nav>
  
  <h1>Page Content</h1>
  <p>Content here...</p>
</main>

<!-- Good: Navigation outside main -->
<nav>
  <a href="/">Home</a>
  <a href="/about">About</a>
</nav>

<main>
  <h1>Page Content</h1>
  <p>Content here...</p>
</main>

Problem: Main Landmark Too Broad or Too Narrow

What's happening: The main landmark either contains too much peripheral content or excludes important primary content.

Simple solution: Include all primary content but exclude peripheral elements:

<!-- Too broad: includes sidebar -->
<main>
  <article>
    <h1>Article Title</h1>
    <p>Article content...</p>
  </article>
  
  <aside>
    <h2>Related Links</h2>
    <!-- Sidebar should be outside main -->
  </aside>
</main>

<!-- Too narrow: excludes important content -->
<article>
  <h1>Article Title</h1>
  <p>Introduction...</p>
</article>

<main>
  <p>Only this paragraph is in main</p>
</main>

<!-- Just right: includes all primary content -->
<main>
  <article>
    <h1>Article Title</h1>
    <p>Introduction...</p>
    <p>Main content...</p>
  </article>
  
  <section>
    <h2>Comments</h2>
    <!-- Comments are part of primary content -->
  </section>
</main>

<aside>
  <h2>Related Links</h2>
  <!-- Sidebar outside main -->
</aside>

Problem: Missing Main Landmark Entirely

What's happening: No main landmark present on pages, forcing users to navigate through all content sequentially.

Simple solution: Add a main element around your primary content area:

<!-- Before: No clear main content identification -->
<div class="wrapper">
  <div class="header">Header content</div>
  <div class="nav">Navigation</div>
  <div class="content">
    <h1>Page Title</h1>
    <p>Page content...</p>
  </div>
  <div class="sidebar">Sidebar</div>
  <div class="footer">Footer</div>
</div>

<!-- After: Clear main landmark -->
<div class="wrapper">
  <header class="header">Header content</header>
  <nav class="nav">Navigation</nav>
  
  <main class="content">
    <h1>Page Title</h1>
    <p>Page content...</p>
  </main>
  
  <aside class="sidebar">Sidebar</aside>
  <footer class="footer">Footer</footer>
</div>

Main Landmark in Different Page Types

Different types of pages require thoughtful consideration of what constitutes the main content:

Blog Posts and Articles

<main>
  <article>
    <header>
      <h1>Article Title</h1>
      <p>Published on <time datetime="2025-05-21">May 21, 2025</time></p>
    </header>
    
    <div class="article-content">
      <p>Article content...</p>
    </div>
  </article>
  
  <section>
    <h2>Comments</h2>
    <!-- Comments section -->
  </section>
</main>

E-commerce Product Pages

<main>
  <div class="product-details">
    <h1>Product Name</h1>
    <img src="product.jpg" alt="Product image">
    <p class="price">$29.99</p>
    <p class="description">Product description...</p>
    
    <form>
      <button type="submit">Add to Cart</button>
    </form>
  </div>
  
  <section>
    <h2>Customer Reviews</h2>
    <!-- Reviews section -->
  </section>
</main>

Search Results Pages

<main>
  <h1>Search Results for "web accessibility"</h1>
  <p>Found 47 results</p>
  
  <section class="results">
    <article class="result">
      <h2><a href="/result1">First Result</a></h2>
      <p>Result description...</p>
    </article>
    
    <article class="result">
      <h2><a href="/result2">Second Result</a></h2>
      <p>Result description...</p>
    </article>
  </section>
  
  <nav aria-label="Search results pagination">
    <!-- Pagination controls -->
  </nav>
</main>

Contact and Form Pages

<main>
  <h1>Contact Us</h1>
  <p>We'd love to hear from you. Send us a message!</p>
  
  <form>
    <div>
      <label for="name">Name</label>
      <input type="text" id="name" required>
    </div>
    
    <div>
      <label for="email">Email</label>
      <input type="email" id="email" required>
    </div>
    
    <div>
      <label for="message">Message</label>
      <textarea id="message" required></textarea>
    </div>
    
    <button type="submit">Send Message</button>
  </form>
</main>

Testing Your Main Landmark Implementation

Regular testing ensures your main landmark works effectively for users:

  • Screen Reader Testing: Use screen readers like NVDA, JAWS, or VoiceOver to navigate to the main landmark using the 'M' key or landmark navigation commands.
  • Skip Link Testing: Test that skip links properly target the main landmark and that focus moves to the correct location.
  • Keyboard Navigation: Navigate your site using only the keyboard to ensure the main content is easily reachable.
  • Automated Testing: Use accessibility testing tools to verify that you have exactly one main landmark per page and that it's properly implemented.
  • HTML Validation: Ensure your HTML is valid and that you're not mixing main element with role="main" inappropriately.
  • Mobile Testing: Test that the main landmark works effectively on mobile devices with screen readers like TalkBack or VoiceOver.

The most important test is whether users can quickly and consistently find your main content using assistive technology navigation features.

The Business Benefits of Proper Main Landmark Implementation

Implementing main landmarks correctly delivers several business advantages:

  • Improved User Experience: Users can access your content more efficiently, leading to better engagement and satisfaction.
  • Reduced Bounce Rates: When users can quickly find your main content, they're less likely to leave immediately due to navigation frustration.
  • Better SEO Signals: Clear content structure can help search engines understand which content is most important on your pages.
  • Legal Compliance: Proper landmark implementation helps meet accessibility requirements in many jurisdictions.
  • Broader Audience Reach: Making your content easily accessible to users of assistive technologies expands your potential audience.
  • Enhanced Brand Reputation: Demonstrating commitment to accessibility through proper implementation reflects positively on your organization.
  • Future-Proofing: As voice navigation and other technologies evolve, proper semantic structure provides a solid foundation.

These benefits combine to create websites that serve all users more effectively while supporting business goals and reducing operational costs related to user support and accessibility remediation.

Main Landmark Implementation Across Different Industries

Different types of websites can benefit from tailored approaches to main landmark implementation:

  • News and media sites can use main landmarks to help readers quickly access article content, bypassing advertising and navigation to focus on the stories they want to read.
  • E-commerce platforms can implement main landmarks to help shoppers quickly access product information, reviews, and purchase options without getting lost in site navigation.
  • Government websites can use main landmarks to help citizens efficiently access services, forms, and information without struggling through complex bureaucratic navigation structures.
  • Educational platforms can implement main landmarks to help students quickly access course content, assignments, and learning materials.
  • Healthcare websites can use main landmarks to help patients quickly find appointment scheduling, medical information, and patient portal access.
  • Corporate websites can implement main landmarks to help visitors efficiently access company information, services, and contact details.

In each case, the key is understanding what users primarily come to accomplish on your site and ensuring that content is clearly marked and easily accessible.

Conclusion: Clearing the Path to Your Content

The main landmark represents one of the simplest yet most impactful accessibility improvements you can make to your website. It's a small implementation detail that makes a dramatic difference in how efficiently users can access your content, particularly those who rely on assistive technologies for navigation.

What makes the main landmark particularly valuable is its universal benefit. While it's essential for screen reader users who can jump directly to main content, it also provides semantic clarity that benefits search engines, voice navigators, and even developers who need to understand page structure.

The principle behind the main landmark—clearly identifying what matters most on each page—reflects good user experience design more broadly. When you think carefully about what constitutes your primary content, you naturally create better-organized, more user-focused websites.

As web experiences become more complex and information-rich, the simple act of clearly marking your main content becomes even more valuable. It's a signal to both users and technology that says, "This is what you came here for," cutting through the noise to deliver value efficiently.

Ready to create clear paths to your content?

Greadme's easy-to-use tools can help you identify missing or incorrectly implemented main landmarks on your website and provide simple instructions to fix them—even if you're not technically minded.

Check Your Website's Main Landmarks Today