The anatomy of an HTML link
<a href="https://menu.htmltourl.dev/" target="_blank" rel="noopener">See our menu</a>
<a>— the anchor element; everything between the tags is clickable.href— where it goes: a web address,mailto:,tel:,sms:or#section.target="_blank"— open in a new tab. Pair it withrel="noopener"so the new page cannot control yours.rel="nofollow"— tells search engines not to pass ranking credit (use for paid or untrusted links;sponsoredandugcare more specific variants).download— save the target instead of opening it (same-origin files only).
Links that work everywhere
- Always include the protocol.
href="www.example.com"is treated as a relative path and breaks; the generator addshttps://for you. - Phone numbers in international format.
tel:+442071234567dials correctly from any country. - Encode email subjects. Spaces and
&in amailto:subject must be percent-encoded — done automatically here, or by hand with the URL encoder. - Descriptive text. "See our menu" is better for screen readers and SEO than "click here".
Need a link to an HTML page you made?
A link needs a destination. If the page is still a file on your computer, publish it first with the HTML to link generator — you get a URL like https://menu.htmltourl.dev/ to put in the href.