HTML <s>
Tag
The <s>
tag is used to indicate that text within the tag should be displayed with a strikethrough effect. This can be useful for indicating that a word or phrase has been deleted or should be disregarded.
Here is an example of how the <s>
tag can be used:
<p>This is <s>old</s> text.</p>
When rendered in a browser, the text "old" will appear with a strikethrough effect:
This is old text.
Below is a table showing the main attributes of the <s>
tag and their uses:
Attribute | Description |
---|---|
title |
Specifies extra information about the element that will be displayed as a tooltip when the mouse is over the element. |
class |
Specifies a class name for the element, which can be used to apply styling with CSS. |
id |
Specifies a unique id for the element, which can be used for JavaScript interactions or linking to specific sections of a page. |