HTML s element

HTML <s> tag defines the content that is no longer valid or true. For example, the price of something that has been changed.

<p> You will be surprised </p>
<p> <s> Price of piza:$18 </s> </p>
<p> <strong> Now selling for just $10</strong> </p>
</>

You will be surprised

Price of piza:$18

Now selling for just $10

Tag omission

Both opening and closing tags are necessary for the s element.

Global Attributes

All the global attributes are applicable on the s element.

HTML formatting introduces many other elements that format the text. For example, underline, insert, del, code etc.

If a piece of content has been deleted then del element is more appropriate.



Was this article helpful?

 

Email:

Message: