📅  最后修改于: 2023-12-03 14:41:53.074000             🧑  作者: Mango
The HTML Strikethrough Tag, also known as the <strike>
tag, is used to strike out or make a line through a piece of text. This tag is commonly used when updating or editing text to show what has been removed.
The syntax for using the <strike>
tag is as follows:
<strike>text to be striked out</strike>
Here is an example of using the <strike>
tag:
<p> This sentence has been <strike>removed</strike> updated. </p>
This will render as:
This sentence has been removed updated.
However, the <strike>
tag has been depreciated since HTML 4.01 and is no longer recommended for use. Instead, the <s>
tag or the <del>
tag should be used instead.
The s
tag syntax is as follows:
<s>text to be striked out</s>
The del
tag syntax is as follows:
<del>text to be striked out</del>
Here is an example of using the s
tag:
<p> This sentence has been <s>removed</s> updated. </p>
This will render as:
This sentence has been removed updated.
Here is an example of using the del
tag:
<p> This sentence has been <del>removed</del> updated. </p>
This will render as:
This sentence has been removed updated.
While the <strike>
tag can still be used, it is recommended to instead use the <s>
tag or <del>
tag as they are more up to date and supported across all modern browsers.