Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

SEO Advanced – Breadcrumbs with `nav[ar | HTML Course lesson | BraveProgrammer
  1. Courses
  2. /
  3. HTML Course

Lesson 50 of 55

·HTML

SEO Advanced – Breadcrumbs with `nav[aria-label="breadcrumb"]` and JSON‑LD

9 min

Course progress91%

What you'll learn

Keep these ideas in mind as you work through the lesson.

5 points
  • Semantic breadcrumb markup using `nav[aria-label='breadcrumb']` and an ordered list
  • JSON‑LD `BreadcrumbList` for rich snippets in search results
  • Styling breadcrumbs with CSS flexbox and separators
  • Testing with Google Rich Results Test and accessibility tools
  • Ensuring URLs are canonical and SEO‑friendly

Advanced SEO – Breadcrumbs

Breadcrumbs help users and search engines understand a page’s location in the site hierarchy.

HTML markup

<nav aria-label='breadcrumb'>
  <ol>
    <li><a href='/'>Home</a></li>
    <li><a href='/portfolio'>Portfolio</a></li>
    <li aria-current='page'>Project X</li>
  </ol>
</nav>

CSS styling (optional)

nav[aria-label='breadcrumb'] ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.5rem;
}
nav[aria-label='breadcrumb'] li::after {
  content: '›';
  margin-left: 0.5rem;
}
nav[aria-label='breadcrumb'] li[aria-current='page']::after {
  content: '';
}

JSON‑LD markup (structured data)

<script type='application/ld+json'>
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://example.com/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Portfolio",
      "item": "https://example.com/portfolio"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Project X",
      "item": "https://example.com/portfolio/project-x"
    }
  ]
}
</script>

Benefits

  • Improves search result snippets – Google may display breadcrumb trails.
  • Enhances internal navigation for screen‑reader users when paired with aria-label='breadcrumb'.
  • Provides a clear hierarchical structure for crawlers.

Quick checklist for breadcrumbs

  1. <nav aria-label='breadcrumb'> present with an ordered list? ✅
  2. Last <li> has aria-current='page'? ✅
  3. JSON‑LD BreadcrumbList markup included and valid? ✅
  4. Tested with Google Rich Results Test? ✅
  5. CSS styling does not break the list on small screens? ✅

Tip: Keep the breadcrumb URLs canonical (no URL parameters) to avoid duplicate‑content issues.

Make it stickPractice what you've learned1 quiz · 2 practical tests · Optional activities from HTML CourseBrowse activities
Previous lessonCustom Data Attributes – `data-*`Continue to lesson 51Preparing for HTML2026 – Emerging StandardsBack to HTML Course curriculum