bootstrap button href does not work

Viewed 25557

Can someone please explain why my link does not work?

<!-- Optional theme  this one is ok -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<button type="button" class="btn btn-primary" href="#">Get your Free Quote now!</button>

3 Answers

The proper way to do it is use but with class of buttons.

<a href="https://www.google.com" class="btn btn-primary">Get your Free Quote now!</a>

Fiddle Example:

https://jsfiddle.net/aq9Laaew/159899/

You can do the following: It works.

<a href="#"><button type="button" class="btn btn-primary">Get your Free Quote now!</button></a>

The design style of the button remains unchanged.

Related