Explanation
The <s>
tag is used to indicate that the text within the tag has been deleted or is no longer accurate. It is often used to show that a text has been replaced by another text.
Use
The <s>
tag is typically used in scenarios where you need to indicate that a text has been deleted or is no longer accurate. It is commonly used in:
- E-commerce websites to indicate a reduced or expired price.
- Writing workflows to indicate that text was deleted in editing/reviewing process.
- Version control systems to indicate that a code or markup was removed from the document.
Important Points
- The
<s>
tag is not recommended for indicating text that needs to be corrected. Use the <del>
tag in that case.
- The strikethrough effect of the text can be set differently using CSS, although it is not recommended as it goes against the default convention.
Summary
The HTML <s>
tag is used to indicate text that has been deleted or is no longer accurate. It is commonly used in e-commerce websites, writing workflows, and version control systems to show that a text has been replaced by another text. However, it is not recommended for indicating text that needs to be corrected. The default strikethrough effect of the text can be customized using CSS.