Agnaldo Luiz Cunha
Agnaldo Luiz Cunha

Reputation: 130

Link Bootstrap Button

I have a piece of code in my flask application that I want to implement a button that takes me to an specific page.

<button type="button" class="btn btn-primary btn-block">Evaluate</button>

How do I link the button? I did putting an tag wrapping it, but can I use the tag directly? (Using the tag is changing my styling)

*I did the code below, but it is not good for me

<a href="{{url_for('evaluate')}}"><button type="button" class="btn btn-primary btn-block">Evaluate</button></a>

Upvotes: 0

Views: 1289

Answers (1)

Adrian Hristov
Adrian Hristov

Reputation: 2037

Use <a> tag instead

<a href="someUrl" class="btn btn-primary btn-block">Evaluate</a>

use the href attribute to navigate to the new location.

Bootstrap will take care of presenting the <a> tag as a button with the css classes.

Upvotes: 3

Related Questions