HTML button link generator

How it worksThe correct way to make a button that goes to a URL is an <a href> styled to look like a button — not a <button> with onclick. Pick colours and text below and copy the inline-styled code.
Button link (recommended)
Form button alternative

Runs entirely in your browser — nothing you type here is uploaded.

Why <a>, not <button onclick>

A styled link keeps everything a link should do: open in a new tab with a middle-click, show the address on hover, be read as a link by screen readers and be followed by search engines. <button onclick="location.href=…"> loses all of that and does nothing when JavaScript is off. Use a real <button> only for actions on the page (submit, open a menu).

Inline styles on purpose

The code uses inline style so it works anywhere you paste it — a CMS block, a Markdown file that allows HTML, or an HTML email where external stylesheets are stripped.

Questions