add link to button onclick code example Example 1: buton html href Button Button Example 2: button as href www.example.com