Strikethrough Text in HTML

Strikethrough Text in HTML – to add strikethrough text in HTML, you can use <strike>, <s> and <del> tags. These tags are depreciated and it doesn’t work in HTML 5. Instead of these HTML codes, you can make use of CSS text-decoration to add strikethrough text.

Strikethrough via <Strike> Tag:

When writing in HTML, <strike> tag is used to add line through text. Now this HTML tag is deprecated.

Example:

Code: <p>Hi I am Mathews from <strike>United States</strike> </p>

Result: Hi I am Mathews from United States

Strikethrough via <s> Tag:

In HTML code <s> tag is used to add strikethrough text.

Example:

Code: <p>Hi I am Mathews from <s>United States</s> </p>

Result: Hi I am Mathews from United States

Strikethrough via <del> Tag:

In HTML code <del> tag is used to add strikethrough text.

Example:

Code: <p>Hi I am Mathews from <del>United States</del> </p>

Result: Hi I am Mathews from United States

Strikethrough Text via Text-Decoration:

Adding strikethrough text via CCS text-decoration is very straight forward. This decoration option has to be used on a tag for test sections. For example <p>, <DIV> and <SPAN>

Example:

Code: <p style=”text-decoration: line-through;”>I Love My Country </p>

Result: I Love My Country

You can also make use of our Strikethrough Text Generator to create strikeout text

You might also like

Loading...

Leave a Reply

Your email address will not be published. Required fields are marked *