HTML Breadcrums for Website Rich Results
SEO Help and Tips
HTML Breadcrums for Website Rich Results
This code creates a breadcrumb navigation with four items: Home, Category, Subcategory, and the Current Page. Each item is marked up with the appropriate schema.org properties, including "itemprop," "itemtype," and "content" for the position.
HTML Breadcrums:
<!-- breadcrumbs -->
<nav aria-label="Breadcrumb">
<ol itemscope="itemscope" itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://example.com">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://example.com/category">
<span itemprop="name">Category</span>
</a>
<meta itemprop="position" content="2" />
</li>
<li itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem">
<a itemprop="item" href="https://example.com/category/subcategory">
<span itemprop="name">Subcategory</span>
</a>
<meta itemprop="position" content="3" />
</li>
<li itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem">
<span itemprop="name">Current Page</span>
<meta itemprop="position" content="4" />
</li>
</ol>
</nav>
<!-- breadcrumbs -->
Other:
Top of Body:
<style>
/* CSS styling for the navigation menu */
ul.nav-menu {
list-style-type: none;
margin: 0;
padding: 0;
}
ul.nav-menu li {
display: inline-block;
margin-right: 10px;
}
ul.nav-menu li a {
text-decoration: none;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 3px;
color: #333;
}
ul.nav-menu li a:hover {
background-color: #f0f0f0;
}
</style>
<ul>
<li><a href="https://example.com/home">Home</a></li>
<li><a href="https://example.com/about">About</a></li>
<li><a href="https://example.com/services">Services</a></li>
<li><a href="https://example.com/contact">Contact</a></li>
</ul>
<div itemscope itemtype="https://schema.org/BreadcrumbList">
<ol>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="https://example.com/home">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="https://example.com/category">
<span itemprop="name">Category</span>
</a>
<meta itemprop="position" content="2" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a itemprop="item" href="https://example.com/subcategory">
<span itemprop="name">Subcategory</span>
</a>
<meta itemprop="position" content="3" />
</li>
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<span itemprop="name">Current Page</span>
<meta itemprop="position" content="4" />
</li>
</ol>
</div>
Please note that you need to replace the example URLs (e.g., "https://example.com") and breadcrumb names with the actual URLs and names relevant to your website structure.
Comments
Post a Comment
Thanks for your Comments.