Ali The Expert

Logo

Those HTML Elements You Never Use

There are over a hundred elements in HTML, all of which can be applied to pieces of text to give them special meaning in a document. Most of us only know a few, like the

,

, and elements… 

But there are actually a bunch more hidden in the dark realms of the W3C reference. That’s why, in this article, I took the liberty of diving deep into the HTML documentation, to come out with a handy bag of elements that will improve your website in not one, but two very important ways: accessibility and SEO.

Press Ctrl+D to bookmark this article and easily come back to it when you need it. And with that said, let’s begin!

This elements represents both abbreviations (like Corporation ➟ Corp.) and acronyms (like Cascading Style Sheets ➟ CSS). Additionally, you can use its title attribute to write the full form of the word so that screen readers can read it and users can hover over it to read it.
These are elements that represent special technically-oriented parts in a document, like definitions, variables, keystrokes, etc…
2y7pjd4a33odpbw0onnl (1)

This element changes the directionality of text to make it render backwards. You can control its behavior using the dir attribute. 

Although not its intended use, but it can reverse text using nothing but HTML!

Highlighting Text

lcgbki4wsap0qsen4tyk
The purpose of this element is to highlight text like you would with a marker.

Clickable Image Areas

70134tynvhr0kzzxl1hl (1)
You can use this element to make certain areas of your image behave like links!
With these two elements, you can add superscripts (like x²) and subscripts (like x₀) to your document.

Labeled Images

6gpjjur0gp27hy5qbltt_11zon-e1660337524311_11zon
You can use to contain any element that you want, like an image for example. And then, you add as its last child, where you can add a block of text that describes what’s above it.
It’s possible to create semantically-accurate dialogs using this element. It doesn’t do much by itself, so you have to use CSS and JavaScript to add more functionality.
This element lets you manually add text-input suggestions. You can add anything you want!

Embedding External Objects

aavm59i9olvricrdpdjc
With this amazing element, you can embed almost any file you want to your website! The most commonly supported files are PDFs, Youtube videos, etc…

If JavaScript Is Disabled

tg2ukhlh1m0yaofuciq0
This element can be used to show some content when JavaScript is disabled by the browser. It’s very commonly used by websites that heavily depend on JavaScript, like Single Page Applications (SPAs).

If you found this guide useful, please don’t forget to bookmark it for future reference. 

I make posts like this everyday, so please follow me to stay informed.