Agnaldo Luiz Cunha Agnaldo Luiz Cunha - 9 months ago 62
HTML Question

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>


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.