This tag is used to specify that the text content is no longer correct or accurate. This tag is similar but slightly different from the <del> tag. The <s>
 tag should not be used to define deleted text, rather use the <del> tag for that.
- The
<s>
tag is used to define text that should be presented with a strikethrough effect.
- TheÂ
<optgroup>
 tag also supports the Global Attributes and Event Attributes in HTML.
- This tag is depreciated from HTML 4.1, but it is redefined in HTML5 using the CSS text-decoration property instead. It is used to define the text is no longer correct.
Syntax:Â
<s> Contents... </s>
Default CSS for <s> tag is as:
s {
 text-decoration: line-through;
}
Example 1: In this example, we will see the use of <s>Â tag by using HTML.
HTML
<!DOCTYPE html>
< html >
< body >
< h1 >
GeeksforGeeks
</ h1 >
< h2 >< s >
Tag
</ h2 >
< p >GeeksforGeeks is a
< s >computer science</ s >
portal for geeks
</ p >
</ body >
</ html >
|
Output:Â
Supported Browsers:
- Google Chrome 1
- Edge 12
- Firefox 1
- Opera 15
- Safari 4
Last Updated :
26 Dec, 2023
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...