A Brief History of Links
Tags: html
Published: 2020-08-28 21:37:07

Back in college, I was tasked with making an HTML site for an introductory computer class. One of the requirements was to add an external link. I no longer remember where the links led to, and I have only a fuzzy memory of making the website about my cat.

  

However, something I didn’t forget was just how easy it was to create an external link:

-   The anchor tag ``<a … ></a>``
    
-   The href attribute
    
-   The target
    

  

I had this belief that linking to another website contained these three elements and little more. However, like many things on the web, even linking to another site has become a bit more complicated.

  

## Back in the HTML Days

  

I didn’t keep the code for my first website, but if I had, the link would have looked something like this:

  

```

<a href="http://www.somewebsiteaboutcats.com">Link to cats</a>

```

  

The ``<a>`` stands for [anchor](https://www.w3.org/MarkUp/1995-archive/Elements/A.html). The href attribute (short for hypertext reference) is equal to the address of where we want our link to send the user to. This address is the target, and doesn’t have to be an external website. It could be an internal link, a pdf, a phone number, an email address, among other things.

  

The text between the ``<a>`` tags should indicate the link’s destination.

  

In the 90s, and much of the early 2000s, links looked like the kind you might see in [Fogcam](https://www.fogcam.org/)--a website that maintains the oldest operating webcam and an old school interface. Here the links are blue and underlined. When I click on one, it flashes red for the duration of the click event, and purple once I return to the page.

 ![Fogcam's links are blue when unclicked and purple after being clicked](https://dev-to-uploads.s3.amazonaws.com/i/8c8m00ucsxgt31l0y08p.png)

Linking behavior hasn't changed since Fogcam was created. Likely, if you clicked on Fogcam, you were taken to that site. Depending on your browser and the website you’re visiting, however, the look of those links has definitely changed.

  
  

## The Style Debate

  

The default behavior of links is to appear blue when they’re unclicked, purple for previously clicked, and red for links in the process of being clicked. Regardless of having been clicked or not, the default link is underlined.

  

However, many websites choose to change this default behavior for a variety of reasons. For example, as of writing this, Dev.to does not underline in-text links and the links I click on do not turn purple or red.

  

[Webfx](https://www.webfx.com/blog/web-design/hyperlink-design/#:~:text=According%20to%20a%20study%20in,have%20been%20acclimatized%20ourselves%20to.) and [Usability.gov](https://www.usability.gov/get-involved/blog/2007/05/underlining-links.html) disagree on the necessity of underlined links. There’s a preponderance of alternatives to underlined links, from changing colors to on-hover events.

  

Opponents of the underline argue that [underlines hurt user readability](https://www.uxbooth.com/articles/is-the-underlined-link-hurting-readability/). Supporters attest that [convention aids accessibility](https://a11y-101.com/development/underlined-links).

  

In some ways, the underlined link debate has become the Oxford Comma of the Internet age.

  
  

## How Links Affect SEO

  

Regardless of your thoughts on underlining links, one relatively new feature of the link is the role it plays in SEO.

  

[Backlinks](https://www.wordstream.com/link-building#:~:text=Building%20links%20is%20one%20of,tend%20to%20earn%20higher%20rankings) , or the amount of links that link back to a site, is one way of boosting SEO. The key to getting backlinks? Write good content that people will want to link back to.

  

But good content by itself doesn’t necessarily mean that a user will link back to it, or see it. Promoting articles through social media channels, posting articles at the right time of day--when users are more likely to see them, and creating partnerships in your content space are all ways to increase backlinks.

  

Linking to credible and well-known websites and [providing meaningful content](http://readabilityguidelines.wikidot.com/links) between the ``<a>`` tags can also provide a boost to SEO.

  

## Links and Security

  

However, perhaps the most explicit rule when it comes to adding links is the use of the ``rel`` tag and the ``"noreferrer noopener"`` targets.

  

Before I set out to build a portfolio website, someone recommended that that the links to my projects should open in new tabs. After all, I didn't want people being led down a rabbit hole of projects only to have a difficult time finding my portfolio site again.

  

The HTML attribute for opening a link in a new tab is ``target="_blank"`` on the ``<a>`` tag.

  

But using ``target="_blank"`` by itself is dangerous and can leave the window open for [malicious activity](https://mathiasbynens.github.io/rel-noopener/).

  

In order to protect users, use ``rel="noreferrer noopener" `` when using linking through to a new tab.

  

Put together, the link would look like this:

  

```

<a  href="https://linktomyproject.com"  target="_blank"  rel="noopener noreferrer"> My Project </a>

```

  

Using the ``rel`` tag won’t affect negatively SEO rankings either.

  

## Summary

Links remain a vital part for many websites. SEO matters like never before, and links can negatively or positively affect rankings. Being intentional about what we link, where we link to, and how we link is an essential part of a coder's or writer's thought process.

## Further Reading

- [About  `rel=noopener` What problems does it solve?](https://mathiasbynens.github.io/rel-noopener/) - Mathias Bynens

- [Designing the Perfect Hyperlink — It’s Not as Simple as You Think.](https://www.webfx.com/blog/web-design/hyperlink-design/#:~:text=According%20to%20a%20study%20in,have%20been%20acclimatized%20ourselves%20to.)  - WebFX

- [Everything You Need to Know About rel=”noopener noreferrer” Tags: Purpose, Benefits and SEO Impact](https://clever-solution.com/blog/everything-you-need-to-know-about-rel-noopener-noreferrer-tags-purpose-benefits-and-seo-impact) - Clever Solution
  
- [ Is the Underlined Link Hurting Readability?](https://www.uxbooth.com/articles/is-the-underlined-link-hurting-readability/) - UX Booth

- [ Learn the Basics of Quality Link Building for SEO](https://www.wordstream.com/link-building#:~:text=Building%20links%20is%20one%20of,tend%20to%20earn%20higher%20rankings) - Wordstream


- [Links Style Guidelines](http://readabilityguidelines.wikidot.com/links) - Readability Guidelines

- [Should All Links be Underlined?](https://www.usability.gov/get-involved/blog/2007/05/underlining-links.html) - Usability.gov

- [Underlined Links](https://a11y-101.com/development/underlined-links) - a11y 101