HTML Link Generator

Build an HTML hyperlink with the right attributes and copy the code.

HTML
<a href="https://www.example.com/guide" target="_blank" rel="noopener noreferrer">Read the full guide</a>

The anchor element <a> is the most important tag on the web: it connects pages, starts downloads, opens email programs and dials phone numbers. A plain link is easy to write, but the attributes that control security, SEO and behaviour are easy to get wrong. The HTML Link Generator builds the correct <a href> code from a few fields and shows a working preview of the link.

  • Web page – any absolute or relative URL.
  • Email – a mailto: link with optional, URL-encoded subject and body.
  • Phone – a tel: link; spaces and dashes are removed so mobile devices can dial it.

Attributes you can set

  • target="_blank" to open in a new tab, automatically paired with rel="noopener noreferrer".
  • rel="nofollow", "sponsored" and "ugc" to qualify outgoing links for search engines.
  • title for a tooltip, class for styling and hreflang for links to translated pages.
  • download with an optional file name for downloadable resources.

Write descriptive anchor text — “Download the 2026 price list” is better for users and SEO than “click here”. Open external sites in a new tab only when leaving the page would interrupt a task, such as filling in a form. Mark affiliate and advertising links as sponsored to follow search engine guidelines. To encode a URL safely before using it, try the URL Encoder; to create a styled call-to-action instead of a text link, use the CSS Button Generator.

Frequently Asked Questions

Without noopener the new tab can access window.opener and redirect your page (tab-nabbing). Modern browsers imply noopener, but adding it explicitly is still recommended for older browsers; noreferrer also hides the referring URL.

Use sponsored for paid or affiliate links, ugc for links in comments and forum posts, and nofollow when you do not want to vouch for the target. Search engines treat them as hints about the link relationship.

Choose Email (mailto) and enter the address. You can prefill the subject and body; the generator URL-encodes them so spaces and special characters work.

It tells the browser to download the linked file instead of opening it. It only works for same-origin URLs or blob/data URLs; cross-origin files usually open normally.