HTML offers a vast array of elements that can enhance the way you present content on the web. While most developers are familiar with standard tags like <div>, <p>, and <a>, there are some lesser-known elements that can be quite useful. Here are five unique HTML elements you might not know about:
1. <q></q> Tag
The <q> tag defines a short quotation. It's perfect for including inline quotes within your text.
<q>Hi 👋, my name is Matin.</q>
Result⤵️
Hi 👋, my name is Matin.
2. <s></s> Tag
The <s> HTML element renders text with a strikethrough, or a line through it. Use the <s> element to represent things that are no longer relevant or accurate.
<p>Old Price <s>100</s></p>
<p>New price 50</p>
Result⤵️
Old Price
100New price 50
3. <mark></mark> Tag
The <mark> HTML element represents text that is marked or highlighted for reference or notation purposes due to its relevance in the enclosing context.
<p>Hi, you should <mark>Follow me</mark> for more amazing content. Thanks!</p>
Result⤵️
Hi, you should Follow me for more amazing content. Thanks!
4. <ruby></ruby> Tag
The <ruby> HTML element represents small annotations that are rendered above, below, or next to base text, usually used for showing the pronunciation of East Asian characters.
<ruby>マティン <rp>(</rp><rt>Matin</rt><rp>)</rp></ruby>
Result⤵️
マティン
5. <details></details> Tag
The <details> HTML element creates a disclosure widget where information is visible only when the widget is toggled into an "open" state. A summary or label must be provided using the <summary> element
<details open>
<summary>Details</summary>
Something small enough to escape casual notice.
</details>
Result⤵️
Details
Something small enough to escape casual notice.
0 Comments