HTML Link Generator
Type the address and the words people will click, choose whether the link opens in a new tab and how search engines should treat it, and this tool writes the anchor tag with the correct rel values. It escapes special characters, so text with quotes or ampersands does not break your page.
What you enter
- Link address
- Link text
- Open in a new tab
- Paid or affiliate link (sponsored)
- Added by a visitor (ugc)
- Do not vouch for this link (nofollow)
- Title (optional)
- CSS class (optional)
How it works
- Paste the full address the link should go to, including https://.
- Type the link text. Describe where the link goes rather than writing click here.
- Choose whether it opens in a new tab, and mark it sponsored, user-generated or nofollow if that applies.
- Optionally add a title or a class, then copy the tag into your page, blog post or email.
What the rel attribute tells search engines
A plain link is a vote of confidence: you are telling readers and search engines that the page is worth visiting. The rel attribute qualifies that vote. sponsored says the link exists because of payment, ugc says a visitor added it, and nofollow says you would rather not pass on any trust.
Getting these right protects your site. Selling links without marking them is against search engine guidelines, and unmarked links in comment sections are a magnet for spam. Mark what needs marking and leave ordinary editorial links clean.
Links that work for everyone
Good link text is short and specific: download the price list is better than click here, because it tells people what happens before they click. It also gives search engines a clear idea of the page you are linking to.
Use full addresses with https:// when you paste links into emails or other sites, since a relative address only works on your own pages. If the link points to a file, mention the format and size in the text, such as price list (PDF, 200 KB), so nobody is surprised by a download.
Tips
- Mark paid links and affiliate links as sponsored. Search engines ask for this, and leaving it off can count against a site.
- Use ugc for links that visitors add in comments or forum posts, so you are not vouching for them.
- Normal editorial links to sources you trust need no rel value at all. Adding nofollow everywhere is not required.
- Opening every link in a new tab can annoy visitors. Keep it for links that would interrupt a task, such as a help page inside a form.
- Write link text that makes sense on its own. Screen reader users often jump from link to link and hear only the text.
Frequently asked questions
What is the HTML code for a link?
A link is an anchor tag: <a href="https://example.com">Example</a>. The href holds the address and the text between the tags is what people click.
How do I make a link open in a new tab?
Add target="_blank". The tool also adds rel="noopener", which stops the new page from getting control of the page that opened it. Current browsers do this by default, but adding it costs nothing and protects older ones.
What is the difference between nofollow, sponsored and ugc?
sponsored marks paid or affiliate links, ugc marks links added by users, and nofollow is the general hint for links you do not want to vouch for. You can combine them, for example rel="sponsored nofollow".
Does nofollow stop search engines visiting the page?
Not necessarily. Search engines treat these values as hints about the link, not as a block. To keep a page out of results, use a noindex tag on that page.
Why does the tool change & into &?
In HTML, & starts a character reference, so a bare & in an address or text can be misread. Writing & is the safe form, and browsers turn it back into & when they follow the link.
Related: UTM builder, URL encoder and decoder, Robots meta tag generator.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Free Tools
- HTML Minifier
- HTML Page Generator
- Accessible HTML Table Generator
- HTML to JSX Converter
- HTML to Markdown Converter
- HTML to Text Converter
- HTML Checker
- HTML Viewer and Live Editor
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App