Set the URL and label
Enter the href and link text (or image source for image links).
Generate HTML link code for text links, image links, email links, and anchor links. Customize colors, targets, and hover styles.
Loading tool…
Follow these steps for a clear answer.
Enter the href and link text (or image source for image links).
Pick target, mailto, download, or other attributes the generator offers.
Paste the snippet into your HTML and adjust classes or rel as needed.
Version 1.0.0 · Last reviewed 2026-07-28
<a href="{url}" …>{label}</a>The HTML Link Code Generator creates ready-to-paste <a> tag code. Select a link type, enter text and URL, customize colors and target behavior, and copy the generated HTML.
| Type | Output |
|---|---|
| Text link | <a href="...">Link text</a> |
| Image link | <a href="..."><img ...></a> |
| Email link | <a href="mailto:...">...</a> |
| Named anchor link | <a href="#id">...</a> |
<a href="https://www.example.com"
style="color: blue; text-decoration: underline;"
target="_blank"
rel="noopener noreferrer">
Visit Example
</a>
<a href="mailto:support@example.com?subject=Hello%20World">
Send email
</a>
Use mailto: in the href field for email links; add subject/body via query parameters when needed.
<a href="#section-id">Jump to section</a>
Use href="#section-id" for same-page jumps when the target element has a matching id.
Key distinctions behind the tool.
Add target="_blank" and preferably rel="noopener noreferrer" for security.
href="mailto:email@example.com" opens the user’s email client with that address.
Yes—wrap an <img> inside the <a>, or use the image-link mode in the generator.