HTML’s Fallen Children! (Part 4)

Tram Ho

After a while, I accidentally found out some interesting HTML tags, so I wanted to share them with everyone, if you know, then let it go!

22. <dfn>

The first will be the <dfn> tag, which is used to define a term (which appears for the first time in the document) in the HTML. Its usage is similar to words in italics in the middle of a paragraph.

The closest parent tag of the <dfn> tag must contain a definition / explanation of the term inside the <dfn> tag.

Most browsers will render an <dfn> element with the following CSS format:

The <dfn> is <dfn> by most browsers, so feel free to use it!

23. <s>

Next is the <s> tag, which is used to designate a text that is no longer correct, exact, or relevant. The text will be displayed with a dash (strikethrough) line.

Since it is a dash, the CSS format of the tag will look like this:

The <s> tag will not be used to define the replacement text or to remove, if you want to handle such cases, you should use the <del> tag.

24. <legend>

The <legend> tag defines a caption for <fieldset> elements.

Syntax of use:

The <legend> attribute is align: top / bottom / left / right and the attributes of this tag are not supported in HTML5.

Usage example:

This tag is also supported in most browsers.

25. <xmp>

The <xmp> defines the pre-formatted text. This tag is the old tag (Deprecated Tag). For example:

The result of the above code will be:

26. <kbd>

The <kbd > tag is the phrase tag. It defines the information entered from the keyboard. It’s a phrase.

This tag is used when a simple document only needs to display the text the user enters from the keyboard, not to be confused with the <input> tag.

The default CSS format for this tag is:


Above are some of the tags that are seldom used and interesting that I know. Through the sharing, I hope to inspire you to have new ideas and find some use cases for these tags. This will probably be the last part of the series “HTML’s Fallen Kids”, because where are so many falling children: v Thank you for taking the time to read the article! You can refer to the following documents:

Share the news now

Source : Viblo