VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-navbar-brand-text/

⇱ Bootstrap 5 Navbar Brand Text - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Navbar Brand Text

Last Updated : 23 Dec, 2022

A navigation bar is used in every website to make it more user-friendly so that the navigation through the website becomes easy and the user can directly search for the topic of their interest. Navbar Brand Text is used to add text in place of the brand logo. We can write text or links using the navbar-brand class.

Navbar Brand Text Class: There is no predefined class to put text in the navbar, we only need to put the text inside of the navbar-brand class used element.

Syntax:

<nav class="navbar navbar-*">
 <div>
 <a class="navbar-brand" href="#">
 Your Navbar Brand Text
 </a>
 </div>
</nav>

Example 1: In this example, we will learn about using a navbar-brand class with links.

Output:

👁 Image
Bootstrap 5 Navbar Brand Text

Example 2: In this example, we will learn about using a navbar-brand class with headings.

Output:

👁 Image
Bootstrap 5 Navbar Brand Text

References: https://getbootstrap.com/docs/5.0/components/navbar/#text

Comment

Explore