HTML s Tag Tutorial

In this section, we will learn what HTML <s> element is and how to use it.

What is <s> Tag in HTML?

HTML <s> element stands for strike and we use it when there’s an incorrect text content in an HTML document and we want to make sure people notice the incorrectness of that content.

Browsers usually put a strikethrough on the value we set as the content of the <s> element to emphasize the incorrectness of the content.

Note: there’s another HTML element called <del> which on appearance does the same thing as <s> element but semantically we use that element when we want users to consider a content as deleted and not incorrect! Basically, at some point, the content of the <del> element was correct but for some reasons like after a date, that content is no-longer valid!

HTML <s> Tag Syntax:

<s> incorrect content </s>

Example: using <s> tag in HTML

See the Pen using <s> tag in HTML by Omid Dehghan (@odehghan) on CodePen.

When to use <s> Tag in HTML?

Use <s> element when you have an incorrect content in an article of your HTML document and want people to know that this part of the article was incorrect in the first place!

Also, usually we add the correct version of that content right after the closing tag of <s> element in another HTML element called <ins>.

Facebook
Twitter
Pinterest
LinkedIn

Top Technologies