Linking Button to URL onClick Event in HTML

HTML mark-up

// button
<button type="button" onClick="location.href='index.html'">GO TO URL</button>

// input button
<input type="button" onClick="location.href='index.html'" value="GO TO URL" />

Linking a button this way is not a the best way for SEO, beacause our link has no anchor text. Only use it if there is no other way.


Related articles

Vecteezy - Free Vector Art

Vecteezy - Free Vector Art


If you need Free Vector Art do not hesitate: visit

Free vector icons

Free vector icons


Want to have some vector icons, free? Try this nice website.

Beautiful free stock photos from StockSnap

Beautiful free stock photos from StockSnap


Would you like some cool stock photos for free? Check out this article, and try this website.

Leave a comment

We welcome any comment from you! Please keep in mind that comments are moderated and rel='nofollow' is in use. So, please do not use a domain as your name or a spammy keyword, or your comment will be deleted.

Name: *

E-mail: *

Message: *

Click on the airplane *

Find us on Facebook



Back to Top