'Button that redirects to another Page

I need this button to redirect me to another Link, and also keeps the gradient with it, its using Pure html, is ther a way to do, and also keeping it with the Font.

For later adding it into a embend notion file. Its a really weird idea, and im new with coding. Thank u so much.

<!DOCTYPE html>
    <html>
    <head> 
        <link rel="preconnect" href="https://fonts.googleapis.com">
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
        <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@1,800&display=swap" rel="stylesheet">
    <style>
    
    .button {
     
        background: #ef577d;
        background: -moz-linear-gradient(left, #AB70E8 0%, #EF577D 50%, #FB8C54 100%);
        background: -webkit-linear-gradient(left, #AB70E8 0%, #EF577D 50%, #FB8C54 100%);
        background: linear-gradient(to right, #AB70E8 0%, #EF577D 50%, #FB8C54 100%);
        margin: 40px;
        font-family: 'Montserrat', sans-serif;
        font-size: 25px;
        padding: 30px;
        text-align: center;
        text-transform: uppercase;
        transition: 0.5s;
        background-size: 140% auto;
        color: #FFF;
        box-shadow: 0 0 10px #ef577d;
        border-radius: 10px;
        width: 600px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
        transition: all 0.3s cubic-bezier(.25,.8,.25,1);
        cursor: pointer;
        display: inline-block;
        border-radius: 40px;
    }
    
    .button:hover {
      background-color: #ef577d;
    }
    </style>
    <button onclick="button">Hacer</button>
    
    
    
    </a>
    
    </body>
    </html>


Solution 1:[1]

Try using "a" tag instead of button tag, onclick can be added to "a" tag.

<a href="#" onclick="button">Hacer</a>

Solution 2:[2]

I found this solution

<button class="button" onclick="location.href='#'">hacer</button>

Solution 3:[3]

try putting button inside a tag, put the link you need to be directed in href and add styles the gradient and more to your button

   <a href=""><button></button></a>

Solution 4:[4]

Add an "a" tag inside the button and put the href to the link you want it to go to.

<button onclick="button"><a href="#">Hacer</a></button>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fuzzer
Solution 2 Andres Camilo De Los Rios
Solution 3 Mahshad
Solution 4 dram95