In Bootstrap we can make a button have various colors by setting various class types e.g. : btn btn-info, btn btn-primary etc.
We can also make a button look like a link (an anchor tag) using the class btn btn-link,
Let's see an example :
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap : Button as link</title>
<meta charset="utf-8">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
<button type="button" class="btn btn-link">This is a button, but looks like a link</button>
<button type="button" class="btn btn-info">This is an info button</button>
<button type="button" class="btn btn-primary">This is a primary button</button>
</body>
</html>
Output :

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!