HTML Link Generator
Generate an HTML anchor element.
Generate an HTML anchor element.
The <a> anchor is the element that makes the web a web — its destination is supplied with the href attribute. It is the standard way to create a clickable hyperlink to another page, a file, a section of the current page, or a non-http resource like an email address. Whatever text or markup sits between the opening and closing tags becomes the visible, clickable link, and doubles as the accessible name that screen readers announce.
https://example.com/page, a relative path, or a mailto:/tel: link.<a> tag.<a href="https://neatjson.com/blog/url-encoding-explained" target="_blank" rel="noopener noreferrer">
Read our guide to URL encoding
</a>
Add target="_blank" only when opening a new tab genuinely helps the user, and pair it with rel="noopener noreferrer" — see below for why. A title attribute can supply extra context on hover but isn't a substitute for descriptive link text.
A tab opened this way can otherwise reach back into the page that linked to it via window.opener — reverse tabnabbing. rel="noopener" blocks that; adding noreferrer also stops the Referer header being sent.
Use the mailto: and tel: schemes as the href value, e.g. <a href="mailto:you@example.com"> or <a href="tel:+15551234567">. Mobile browsers open the dialer directly for tel: links.
Screen readers can list every link's text out of context. "Click here" tells that list nothing. Write link text that stands alone, like "Download the 2026 pricing PDF".
Yes — set href to #id where id matches an element on the page, e.g. <a href="#pricing"> scrolls to <section id="pricing">, no JavaScript needed.