🔗 HTML Link Generator
Generate HTML link tags with attributes: href, target, rel, title, class, id, download. Live preview, copy and clear — all in your browser, no upload, instant results.
About the HTML Link Generator
This HTML link generator runs entirely in your browser. Fill in the URL, link text, and any optional attributes (target, rel, title, class, id, download), and the tool produces a ready-to-paste <a> tag with a live preview. Nothing is uploaded — all generation happens locally with JavaScript on your device.
Common attributes
- href — The destination URL. Required for the link to do anything.
- target — Where to open the link.
_blankopens in a new tab;_self(default) opens in the same tab. - rel — The relationship between the current page and the linked page. Use
noopener noreferrerwithtarget="_blank"for security. - title — A tooltip shown when hovering over the link.
- class — One or more CSS class names for styling.
- id — A unique identifier for the element.
- download — Tells the browser to download the linked resource instead of navigating to it. Optionally specify a filename.
How to use the generator
- Enter the URL and link text — these are the only required fields.
- Pick a target if you want the link to open in a new tab.
- Choose a rel value. For external links opening in a new tab,
noopener noreferreris the safe default. - Add optional title, class, id, or download attributes as needed.
- Click Copy and paste the generated HTML into your page.
Frequently asked questions
Does this tool upload my data? No. Everything happens locally in your browser. Your inputs never leave your device.
Why should I use rel="noopener noreferrer" with target="_blank"? Without it, the new tab can access the original page's window.opener, which is a security risk. Modern browsers default to this behavior, but it's still good practice to include it explicitly.
What's the difference between nofollow and noopener? nofollow tells search engines not to follow the link for ranking purposes. noopener is a security attribute that prevents the new tab from accessing the opener window.
Can I generate email or phone links? Yes — just use mailto:[email protected] or tel:+15551234567 as the href value. The generator will produce a valid link tag.