Anatomy of an HTML link
A hyperlink in HTML is an <a> (anchor) element. Its href attribute holds the destination, and the content between the tags is what visitors click. This HTML link generator assembles the tag with correctly quoted and escaped attributes, so special characters in URLs or text cannot break your page.
<a href="https://example.com" target="_blank" rel="noopener noreferrer nofollow">Visit Example</a>
HTML link generator options explained
- Title – shown as a tooltip on hover. It is optional and should add information rather than repeat the link text.
- Open in new tab – adds
target="_blank"together withrel="noopener noreferrer".noopenerstops the new page from controlling your page throughwindow.opener, andnoreferreralso withholds the referring URL. - nofollow – tells search engines you do not vouch for the destination. Use it for links you do not want to endorse, such as user-submitted links.
- sponsored – marks paid, affiliate or otherwise compensated links, as Google's guidelines ask. You can combine it with nofollow.
- Color, bold, underline – simple inline styles for places where you cannot edit the stylesheet, such as some CMS fields or email signatures.
Writing good link text
Link text matters for both accessibility and search. Screen-reader users often jump from link to link, hearing only the text, so vague words such as "here" or "read more" tell them nothing. Descriptive text such as "download the 2026 price list (PDF)" works for everyone and gives search engines context about the target page.
Absolute vs relative URLs
An absolute URL (https://example.com/pricing) works anywhere, including emails and other websites. A root-relative URL (/pricing) only works on your own site but survives a domain change. Use absolute URLs for anything that leaves your site.
Useful href values beyond web pages
#pricingjumps to the element withid="pricing"on the same page, handy for tables of contents./guides/setup#installopens another page and scrolls to a section on it.tel:+442071234567starts a call on phones. Use the international format with a plus sign and no spaces.mailto:links open an email draft; the mailto link generator encodes a subject and body for you.
Whichever destination you choose, test the link after publishing: a typo in a fragment or path fails silently.
Safety checks
The generator escapes quotes and ampersands in the URL and text, and it refuses javascript: URLs, which can run code when clicked. Links to mailto: and tel: addresses work normally, for example mailto:hello@example.com.
Need other formats?
If the same link is also going into a README or a forum post, the hyperlink generator produces HTML, Markdown and BBCode versions at once. URLs with spaces or special characters should be encoded first with the URL encoder, and you can test many links on a page with the broken link checker.
The tag is generated in your browser; nothing is stored.