HTML <s> Tag

HTMLWeb DevelopmentFront End Technology

The <s> tag in HTML is used to mark a text that is no longer relevant. This tag was redefined in HTML5 to display a text that is not accurate.

Let’s see an example to implement the <s> element −

Example

 Live Demo

<!DOCTYPE html>
<html>
<body>
<h2>Exam Results</h2>
   <p><s>Result would be announced on 6th June.</s></p>
   <p>New date for results are 7th June.</p>
</body>
</html>

Output

In the above example, we have set a text which is no longer relevant−

<s>
Result would be announced on 6th June.
</s>

The usage of <s> would strike the same text as shown in the above output.

raja
Updated on 11-Jun-2020 11:06:00

Advertisements