typestar

Link targets and relationships in HTML

The attributes that say where a link opens and what it is for.

<a href="https://example.com/docs" target="_blank"
   rel="noopener noreferrer">Docs (opens in a new tab)</a>

<a href="/reports/july.pdf" download="july-report.pdf">
  Download the July report
</a>

<a href="https://social.example/@ada" rel="me">My profile</a>
<a href="https://example.com/sponsor" rel="nofollow sponsored">Sponsor</a>

How it works

  1. target="_blank" needs rel="noopener" unless you trust the page.
  2. download saves the file instead of navigating to it.
  3. rel="nofollow" and rel="me" describe the relationship, not the target.

The run, in numbers

Lines
9
Characters to type
331
Tokens
59
Three-star pace
65 tpm

At the three-star pace of 65 tokens a minute, this run takes about 54 seconds.

Type this snippet

Step 3 of 7 in Links & images, step 18 of 28 in Document structure.

← Previous Next →