
In “5 HTML Tags You Probably Didn’t Know About,” Gianmarco Ebeling identifies 5 HTML tags that are useful but often overlooked.
- <kbd> – used to represent a key on a keyboard. The browser’s monospaced font displays the text surrounded by these tags. If you wanted to write a message to users instructing them to use the ALT key, this tag would make the ALT key easier to identify.
- <progress> – used to display a progress bar and can be given a value. If you wanted to show that something is 25% complete, you could give the tag a value of 25.
- <sub> and <sup> – Subscript text appears (defined by the <sub> tag) “half a character below the normal line and is most of the time rendered in a smaller font.” Superscript (defined by the <sup> tag) appears half a character above the line that text is typically displayed on and also appears in a smaller font size.
- <details> and <summary> – “these tags are used together to create a disclosure widget. <summary> is used as the label for the widget, and it can be clicked to view/hide the details, wrapped in the <details> tags.”
- <datalist> – can be used to provide an “autocomplete” feature for input elements by presenting a list of options for users to choose from.