← Back to Bootstrap Course | Chapter 6: Components — Navigation | Lesson 6 of 7

Breadcrumbs क्या हैं

Breadcrumbs current page का path दिखाते हैं और visitors को hierarchy में वापस jump करने देते हैं।

In this page:

  1. Breadcrumbs
Syntax
markup
<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#">Home</a></li>
    <li class="breadcrumb-item active" aria-current="page">Current</li>
  </ol>
</nav>

Breadcrumbs

li.breadcrumb-item elements वाला एक ol.breadcrumb hold करने वाले aria-label="breadcrumb" के साथ nav इस्तेमाल करें। Last item को .active और aria-current="page" मिलता है। Separators CSS से add होते हैं और एक CSS variable से बदले जा सकते हैं।

Note: Breadcrumbs hierarchy के लिए हैं, browsing history के लिए नहीं।

उदाहरण: Breadcrumbs

markup
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="p-3">
<div class="container">
  <nav aria-label="breadcrumb">
    <ol class="breadcrumb">
      <li class="breadcrumb-item"><a href="#">Home</a></li>
      <li class="breadcrumb-item"><a href="#">Library</a></li>
      <li class="breadcrumb-item active" aria-current="page">Data</li>
    </ol>
  </nav>
</div>
</body>
</html>
Live Example
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. Current page को एक link बनाना
  2. aria-label missing होना
  3. ol की बजाय ul इस्तेमाल करना
चैप्टर सारांश
  • aria-label breadcrumb के साथ nav
  • ol.breadcrumb और li.breadcrumb-item
  • Last item active है
  • Separators CSS-generated हैं
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.