![]() |
Bootstrap 5 has various classes that can be used to create different elements with highly customizable styling. By using Bootstrap Classes, we can create a button that looks similar to the link. In this article, we will create a button that looks like a link with Bootstrap 5 classes. We will explore two different approaches with their Syntax, and practical implementation in terms of example and output demonstration. Using btn and btn-link ClassesIn this approach, we are using the Bootstrap 5 classes of btn and btn-link to create a button that looks like a link. When the user clicks on the button, the alert shows the message “The Button is Clicked“. Using these classes, we can create link-based buttons that look like actual links rather than a simple button. Syntax:<button class="btn btn-link">Click me</button>
Example: Below is the implementation of the above-discussed approach. HTML
Output:Using btn and text-decoration-none ClassesIn this apporach, we are using the btn anf text-decoration-none class. The text-decoration-none class removes all the button styling properties and makes it look like a normal link. When the user clicks on th button, a message is been shown which is specified in alert box. Syntax:<button class="btn text-decoration-none"> Example: Below is the implementation of the above-discussed approach. HTML
Output: |
Reffered: https://www.geeksforgeeks.org
Bootstrap |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |