Check out example codes for "html button click url". It will help you in understanding the concepts better.

Code Example 1

# Wrap whole button in a 'a' tag.
 <a href="https://google.com" class="button"><button class="pixel">Button text</button></a>

Code Example 2

a.button {
    -webkit-appearance: button;
    -moz-appearance: button;
    appearance: button;

    text-decoration: none;
    color: initial;
}

Code Example 3

<button onclick="location.href='http://www.example.com'" type="button">
         www.example.com</button>

Learn ReactJs, React Native from akashmittal.com