Did You Know These 14 Useful HTML Tags?
Tags: html, webdev, tutorial, beginners
Published: 2021-02-10 15:58:29

*This post was originally published at [kais.blog](https://kais.blog/p/did-you-know-these-14-useful-html-tags).*

**Let's move your learning forward together!** [Follow me on Twitter](https://twitter.com/intent/follow?screen_name=kais_blog) for your daily dose of developer tips. Thanks for reading my content!

---

HTML is a markup language. That means you are adding structure and semantics to your document by adding *tags*. These tags help the browser rendering and also assists machines understanding your content.  Furthermore, they help in preventing accessibility issues. That's why you should take your time and add the right tags to your content.

While HTML is widely known and used, there are still a lot of uncommon yet useful HTML tags. In this post I'd like to show you some awesome HTML tags you might not know.

- [\<abbr>: Abbreviation](#ltabbrgt-abbreviation)
- [\<address>: Contact Address](#ltaddressgt-contact-address)
- [\<blockquote>: Block Quotation](#ltblockquotegt-block-quotation)
- [\<cite>: Citation](#ltcitegt-citation)
- [\<figure> & \<figcaption>: Figure with Optional Caption](#ltfiguregt-amp-ltfigcaptiongt-figure-with-optional-caption)
- [\<kbd>: Keyboard Input](#ltkbdgt-keyboard-input)
- [\<map>: Image Map](#ltmapgt-image-map)
- [\<noscript>: Visible If JavaScript Is Disabled](#ltnoscriptgt-visible-if-javascript-is-disabled)
- [\<progress>: Progress Indicator](#ltprogressgt-progress-indicator)
- [\<sub> & \<sup>: Subscript & Superscript](#ltsubgt-amp-ltsupgt-subscript-amp-superscript)
- [\<var>: Variable](#ltvargt-variable)
- [\<wbr>: Word Break Opportunity](#ltwbrgt-word-break-opportunity)

## \<abbr>: Abbreviation

You can use the `<abbr>` tag to define an abbreviation or an acronym. It helps a lot with web accessibility. In combination with the `title` attribute you can add a little tooltip that is shown on hovering the element.

```html
<abbr title="Hypertext Markup Language">HTML</abbr>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr

## \<address>: Contact Address

Use the `<address>` tag to denote contact information for a person or an organization.

```html
<address>
  John Doe<br>
  <a href="mailto:john@example.com">john@example.com</a>
</address>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address

## \<blockquote>: Block Quotation

The `<blockquote>` tag indicates that the section is quoted from another source. You can also use the `cite` attribute to add the URL for the source of the quotation.

```html
<blockquote cite="https://alice.book">
  <p>
    It's no use going back to yesterday, because I was a different person then.
  </p>
</blockquote>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote

## \<cite>: Citation

The `<cite>` tag is mostly used in conjunction with the `<blockquote>` tag. It should be used to denote the title of the creative work.

```html
<blockquote>
  <p>
    It's no use going back to yesterday, because I was a different person then.
  </p>
  <footer>
    <cite>Alice's Adventures in Wonderland</cite> by Lewis Carroll
  </footer>
</blockquote>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite

## \<figure> & \<figcaption>: Figure with Optional Caption

The `<figure>` tag lets you mark up self-contained content like a diagram or a photo. Use it in conjunction with the `<figcaption>` tag to define a caption for the `<figure>` element.

```html
<figure>
  <img src="diagram.png" alt="Net income of households by household type">
  <figcaption>Fig.1 - Net income of households by household type</figcaption>
</figure>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure

## \<kbd>: Keyboard Input

With the `<kbd>` tag you can define keyboard input. It's usually rendered in a monospace font.

```html
<p>
  Open the task manager by pressing <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Del</kbd>
</p>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd

## \<map>: Image Map

With the `<map>` tag you can create an image with clickable areas. You can specify how different areas of the image should link to different URLs.

For this, you'll have to add the `usemap` attribute to your `<img>` tag. Also, your map has to use multiple `<area>` tags to denote the different areas.

```html
<img src="office.jpg" alt="Floor plan" usemap="#floorplan">

<map name="floorplan">
  <area shape="rect" coords="…" alt="Conference Room" href="conference-room.htm">
  <area shape="rect" coords="…" alt="Kitchen" href="kitchen.htm">
  …
</map>
```

Unfortunately, explaining the usage of `<map>` in detail is beyond the scope of this article.

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map

## \<noscript>: Visible If JavaScript Is Disabled

The `<noscript>` tag only renders its contents if the user has JavaScript disabled. For example, you could add a small note they should enable JavaScript. If they have it enabled, this note is hidden.

```html
<noscript>
  For full functionality of this site it is necessary to enable JavaScript. Please enable JavaScript in your browser.
</noscript>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript

## \<progress>: Progress Indicator

Use the `<progress>` tag to show a progress bar for a task. Also, remember to add a `<label>` tag for accessibility reasons.

```html
<label for="file">Uploading progress</label>
<progress id="file" value="28" max="100">28%</progress> 
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress

## \<sub> & \<sup>: Subscript & Superscript 

The `<sub>` tag defines subscript text. The contents are rendered with a lowered baseline using smaller text. This is useful e.g. for chemical formulas:

```html
Despite its dangers, Dihydrogen monoxide (H<sub>2</sub>O) is often used.
```

Conveniently there is also a tag for superscript. The contents of the `<sup>` tag are rendered with a raised baseline using smaller text. For example, you can use this for mathematical expressions:

```html
a<sup>2</sup> + b<sup>2</sup> = c<sup>2</sup>
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup

## \<var>: Variable

Use the `<var>` tag to describe a variable in programming or in a mathematical expression.

```html
Given the width <var>w</var> and the height <var>h</var> you can calculate the area of the rectangle.
```

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var

## \<wbr>: Word Break Opportunity

The `<wbr>` tag specifies a position within text where a line-break would be allowed. So, you can allow to break a (very) long word into multiple lines.

```html
Dampf<wbr>schiff<wbr>fahrt
```

The example shows adding word break opportunities to a long german word.

Further reading: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr

## Conclusion

HTML has a lot of useful tags. Instead of using `<div>` and `<span>` for everything, try adding more semantics to your documents. Your site will become more friendly towards machines and humans.

Did you know all of these tags? Please consider sharing this list with your friends and colleagues if it was interesting for you.


---

**Let's move your learning forward together!** [Follow me on Twitter](https://twitter.com/intent/follow?screen_name=kais_blog) for your daily dose of developer tips. Thanks for reading my content!

*This post was originally published at [kais.blog](https://kais.blog/p/did-you-know-these-14-useful-html-tags).*