A link is one short line of markup, and one of the easiest lines on a page to break. Type the tag by hand and miss one quote, and the damage is not limited to that link. The browser reads on, looking for the quote that never comes. The text and tags after it get pulled into the mess. The page looks haunted and the cause is a single character.

Every one of these failures is a hand-writing failure. This guide walks through the four that show up most often. It shows the correct shape of an anchor tag to compare against. It also shows how the free URL to HTML Link Converter on Ovatly avoids the whole class of errors. The converter builds the tag from fields instead of asking you to type it.

Contents

  • Quick answer
  • The correct shape of an anchor tag
  • Mistake one: the missing closing quote
  • Mistake two: the unquoted or half-quoted href
  • Mistake three: spaces typed raw into the address
  • Mistake four: markup characters in the link text
  • How to build links without typing tags, step by step
  • Worked example: the reference shape and its broken variants
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Hand-written links break in predictable places. A closing quote goes missing from the href attribute. An address is left unquoted, so a space ends it early. Spaces are typed raw into the address. Markup characters are typed into the link text, so they render as markup instead of text. The structural fix is to stop typing tags. The URL to HTML Link Converter takes a plain list of URLs and builds each tag from fields. It attribute-escapes the href and HTML-escapes custom link text. It reports invalid lines as skipped instead of emitting a broken tag.

The correct shape of an anchor tag

An anchor tag has three parts that have to survive intact. The href attribute holds the destination inside quotes. The link text is what a visitor reads and clicks. Then there is the closing tag. Here is the reference shape, produced by the converter from one pasted address:

<a href="https://example.com/">example.com</a>

Everything in this guide is a way of falling short of that shape. Note the details, because the mistakes attack exactly these. The address sits inside a matched pair of double quotes and contains no spaces. The link text is plain text, and the tag closes.

Mistake one: the missing closing quote

The href attribute works because the opening quote has a partner. Leave the closing quote off and the value keeps going. The rest of the tag, the link text and whatever markup follows are all read as part of the address. Some later quote on the page finally closes it. The link points at a garbled string made of your page's own text, and the content that got swallowed stops rendering as content.

This is the most destructive of the four because its blast radius extends past the link itself. One missing character near the top of a page can mangle everything below it.

Mistake two: the unquoted or half-quoted href

Quotes are not decoration. A value written without quotes ends at the first space. An address containing a space loses everything after it. The leftover words get read as attributes that mean nothing. Half-quoting, an opening quote with no closing one or the reverse, lands you in the same territory as mistake one.

Short, simple addresses sometimes survive being unquoted, which is what makes this mistake sneaky. It survives your test page, then breaks on the first longer address with a space in it.

Mistake three: spaces typed raw into the address

An address is a single token. A space typed raw into it, inside the quotes this time, does not end the attribute. But the address as written is no longer the address you meant. A path like my page.html contains a character that does not belong in a URL as typed.

The fix at the keyboard is to write the address the way addresses are formed. Join the words or encode the space. Do not leave a raw gap and hope every consumer papers over it the same way.

Link text is supposed to be text. Type markup characters into it by hand and they do what markup characters do: they render as markup. Put a bold tag around your link text and the visitor sees bold text, not the characters you typed.

This mistake cuts both ways. Sometimes you wanted the characters visible, as documentation or an example, and they vanished into formatting. Sometimes you pasted text that happened to contain them and inherited formatting you never asked for. Either way, typed characters do not stay characters unless something escapes them.

  1. Open the URL to HTML Link Converter and paste your URLs, one per line. Bare domains are fine; the converter adds https:// to them.
  2. Choose the link text style: the URL itself, the domain only, or custom wording. Custom text can use the {url}, {domain} and {n} placeholders, and it is HTML-escaped, so anything you type shows as text.
  3. Set the target and rel options that fit where the links will be published. The href the converter emits is attribute-escaped as a matter of course.
  4. Copy the generated HTML block and paste it into your page. Any line that was not a valid URL is reported as skipped under the result, never silently turned into a link.

Worked example: the reference shape and its broken variants

Start from the converter's own output for the input https://example.com, link text set to domain only, no attributes ticked:

<a href="https://example.com/">example.com</a>

Now hold the hand-written failures up against it. First, the missing closing quote:

<a href="https://example.com/>example.com</a>

The value never closes, so the tag and text after it are read as part of the address. The unquoted address with a space in the path:

<a href=https://example.com/my page.html>example.com</a>

Here the href ends at the space, and page.html dangles as a meaningless attribute. And markup typed into the text:

<a href="https://example.com/"><b>example.com</b></a>

The visitor sees bold text, not the characters typed. The converter's output cannot drift into any of these shapes, because you never type the tag. You supply an address and a text style. It assembles the line with quotes matched and characters escaped.

Limitations and honest tradeoffs

The converter removes hand-writing errors from the tags it generates; it does not proofread your intentions. It does not check that a site is live, so a perfectly formed tag can still point at a dead or wrong destination you pasted. If you genuinely want markup inside your link text, the converter will faithfully show it as text instead. You will have to add that markup yourself afterwards. It also builds new tags from a list; it does not repair links already broken in an existing page.

Common mistakes

  • Hunting the symptom instead of the quote. When a page breaks below a link, check that link's closing quote first; swallowed content is the signature.
  • Trusting a short test address. An unquoted href can survive a simple address and break on the first one with a space.
  • Leaving raw spaces in paths. Join the words or encode the space; never ship an address with a gap in it.
  • Typing examples as live markup. Characters meant to be seen must be escaped, or they render as formatting.
  • Assuming a generated tag means a live destination. Form and reachability are separate checks; the converter handles the first.

FAQs

Does the converter check that the sites are live? No. The converter only reads the text you paste and formats it. It does not visit the sites, so checking that a destination is live is a separate job.

What happens to a line in my list that is not a valid URL? It is reported as skipped under the result. The converter never silently turns an invalid line into a link, so a bad line cannot become a broken tag in your page.

Why does markup I type as link text show up as visible text? Custom link text is HTML-escaped by the converter, so the characters you type produce visible text rather than markup. The href is attribute-escaped too, for the same reason.

Why is rel=noopener already ticked? It is ticked by default because it makes links that open in a new tab safer at no cost. Untick it only if a system you publish to strips it anyway.

Do bare domains work, or do I need the full address? Bare domains work. The converter adds https:// to them, so a line holding just a domain becomes a link to that domain's secure address.

Conclusion

A broken link is rarely a mystery once you know the four shapes hand-writing fails in. There is the quote that never closes, and the address a space cuts short. There is the raw space inside the address, and markup characters sitting where text should be. Build the tag from fields with the URL to HTML Link Converter and those four shapes cannot occur. For which labels a link should carry once it is built correctly, see our guide to nofollow and sponsored attributes, and browse the full set in the URL and Link Tools guides.