duda
10 Cool HTML Tags You Didn't Know Existed

Russ Jeffery • Dec 22, 2020

A Duda customer recently asked me about semantic HTML tags and this turned on the curious side of my brain. With modern web design and HTML5, there are a range of semantic HTML tags that help people and/or robots reading your website’s HTML code understand the structure or context of the content on a page. 


Anyone who’s been around the web is familiar with the classic tags: <p> for paragraph, <table> for a structured table, <h1> - <h6> for heading sizes. These are the classic semantic tags of HTML. You might even be familiar with a bit more specific tags such as <nav> for navigation, <article> for blog or news articles, <header> and <footer>, etc.. 


On its own, semantic HTML is a great tool that makes websites easier to understand and parse. But, this made me curious about all the different HTML tags that exist officially as part of HTML 5 and sent me down a rabbit hole of fun (yes, this is my idea of fun on a Tuesday night). So, I thought I’d share my findings. 

Some of these tags are actually pretty powerful, some are just kind of fun and some can be used for semantic situations. Really, the point here is just to show you there is much more to HTML than meets the eye.

10 COOL LESSER-KNOWN HTML TAGS 

Let's take a more in-depth look at each one of the HTML tags I've listed above.







1. <del> and <ins>

There is actually a tag for text that is struck-through and another that indicates the replacement text. This comes directly out of the semantic playbook to show that a piece of text should be deleted. 

An example of this is: "Pluto is isn't a planet."

In HTML, here is how that looks:


 

<p>Pluto<del>is</del> <ins>isn’t</ins> a planet.</p>


If you want to be extra fancy, you can even include a datetime attribute on the <ins> tag to show when the new text was added or amended.






2. <abbr>

“abbr” is short for abbreviation! (Would you ever have guessed?) The idea here is that if you use a title (e.g. “Mr.”) or acronym (e.g. “POTUS”), the abbr tag indicates exactly what that abbreviation means. 

For example:


 

<p><abbr title="President of The United States">POTUS</abbr> rode his bicycle into a tree.</p>


What’s great here is that you can clearly see in the code that the abbreviation tag gives context as to what exactly the shorthand means.




3. <meter>

The next two elements in our list are similar, but definitely not the same. Meter is a built-in range to give an indication of good, medium or bad results. When building a website, this gauge is a nifty tool built into browsers that is normally created using much more custom code and JavaScript.

Here is what this looks like in HTML:


 

<meter min="0" max="100" low="59" high="90" optimum="90" value="50">50%</meter>


And here is what this looks like on the page:

4. <progress>

Both the progress and meter tags display bars on a web page. However, the progress tag is designed to show how far along something is, such as a project or task. 

For example, if you wanted to show a project is 70 percent complete, you could use this HTML:


 

<progress id="project" max="100" value="70"> 70% </progress>


And here is what that would look like on the page: 



5. <details> and <summary>

Did you know HTML has a built-in accordion feature? Most websites that implement some type of accordion rely on JavaScript to implement the ‘open and close’ experience, but this is actually a native feature of HTML5. 

Here is an example of what this looks like in HTML:




 

<details>

    <summary>Details</summary>

    Something small enough to escape casual notice.

</details>

<details open>

<summary>Item 2</summary>

  Something else. This one defaults to open!

</details>

And here is an example of what this looks like when it's running:

See the Pen Details Summary HTML by Russ Jeffery ( @russjeffery ) on CodePen.

6. <blockquote> & <cite>

If you’re including content from a different source, you should absolutely cite that source (yes, just like in college). The blockquote and cite HTML tags are the semantic version of this that indicate the content is from an outside source.

Here is an example of this written out in HTML:




 

<figure>

    <blockquote cite="https://en.wikipedia.org/wiki/Citizenship_in_a_Republic">

        <p>It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better...</p>

    </blockquote>

    <figcaption>--Teddy Roosevelt, <cite>Citizenship in a Republic Speach</cite></figcaption>

</figure>


And here is how that looks on the page:

7. <time>

The time element is both semantic and structured data. It tries to tell crawlers and bots what time exactly is being referenced. A perfect example of where this can be used is in the post date of an article, blog post or page. Most clients or businesses will want this added to the blog section of a website, so if you’re offering a white label service it’s always worthwhile suggesting it as it’s a handy tag to have in your back pocket.



 

<p>Posted: <time datetime="2020-07-07">July 7th</time></p>


Now, this element does not have a special display and will simply look like all the text around it; but, it provides much more context to any computer or person reading it!






8. <datalist>

The datalist tag is one I really wish more developers knew about. Often, developers will use complex JavaScript libraries to implement this exact same functionality, even though it already exists in HTML! 

A datalist is an advanced drop-down to select something in a form. The nice thing is that it works as both a search and a drop-down.

Here is an example of how to implement this tag in HTML:


 

<label for="car-make">Choose a car make:</label>

<input list="car-makes" id="car-make" name="car-makes" placeholder="Select make.." />


<datalist id="car-makes" >

    <option value="BMW">

    <option value="Tesla">

    <option value="Toyota">

    <option value="Volkswaggon">

    <option value="Mazda">

</datalist>


And here’s a simple example of what this looks like in action:

See the Pen ExggrGR by Russ Jeffery ( @russjeffery ) on CodePen.

9. <mark>

If your website is informational and you really want to highlight a key point, then you can do so using the <mark> tag. It’s a way to highlight a block of text, just as you would in a Google Sheets or Word doc, with the option of also customizing the highlighted color. This can be done using the “background-color” CSS property within the <mark> tag, while the text color can be altered with the “color” property.

Here is an example of how to use the <mark> tag:


 

<mark> It is not the critic who counts; not the man who points out how the strong man stumbles, or where the doer of deeds could have done them better… </mark>

10. <audio>

With audio becoming more and more important when building a website, boosting both user experience and SEO value of a website, the <audio> HTML tag is a really useful addition, particularly if adding audio does suit the search intent of the user. 

The <audio> tag will define a sound and there are three supported files which the tag can be used with. These are MP3, WAV and OGG. How you implement the audio tag into a page is by placing one or more <source> tags with different audio sources. A browser will then select the first one it supports.

Should the browser not support audio, it will then display the text that is between the <audio> elements. It’s becoming more and more of a common tag as audio continues to become more popular with sites, so if you are offering this kind of software as a service and building websites with audio, then it’s certainly one to consider.

Here’s an example of how this HTML tag looks:


 

<audio controls>

<source src=”house.ogg” type=”audio/ogg”>

<source src=”house.mp3” type=”audio/mpeg”>

Your browser does not support this audio

</audio>


Conclusion

As you can see, there are a lot of great HTML5-based tags out there and I’ve only scratched the surface. HTML5 has done wonders for the web and continues to be a place of great innovation in browsers. Let’s all just hope that browser vendors continue to extend and add easy to use core HTML elements like these into the future!

RELATED POSTS

The homepage for Duda.co
By Renana Dar 22 Apr, 2024
We sat out to redesign Duda's homepage using the most advanced capabilities of our own platform. See how we combined design, code, and advanced drag-and-drop capabilities to create a homepage like no other.
A man and a woman are sitting at a table with a laptop and a dog.
By Renana Dar 12 Apr, 2024
This article highlights web design agencies' unique challenges and provides a comprehensive look at how Duda is empowering these agencies with a complete toolkit for navigating the digital world's uncertain waters.
Duda's widget picker overlaying a screen with HTML computer code
By Shawn Davis 21 Mar, 2024
Custom widgets empower your agency to create hyper-personalized, bespoke websites for clients—but only if you know how to code. Well, what if you didn’t have to?
Show More
Entrepreneur's logo and How to design an eye-catching website that truly captures your audience.
By Itai Sadan 24 Apr, 2024
The rules governing a "well-designed website" are in constant flux. So getting insights into the latest web design trends for 2024 is crucial to captivate visitors and engage the right audience for your business.
The homepage for Duda.co
By Renana Dar 22 Apr, 2024
We sat out to redesign Duda's homepage using the most advanced capabilities of our own platform. See how we combined design, code, and advanced drag-and-drop capabilities to create a homepage like no other.
Three cards with a picture of a chair on them
By Shawn Davis 19 Apr, 2024
There exists a maximum number your customers are willing to pay, but finding that number is no easy task. Here’s everything your SaaS company needs to know about uncovering this elusive metric.
Show More

Latest Posts

Share by: