How to display incorrect content using HTML5 ?
In this article, we will display the text that is not correct by using the <s> tag in the document. This tag is similar but slightly different from <del> tag. It is not used to replaced or deletes text but <del> tag is used to replaced or delete the text.
Syntax:
<s> Contents... </s>
Example 1:
<!DOCTYPE html>
< html >
< head >
< title >
How to define text that
is no longer correct?
</ title >
< style >
body {
text-align: center;
}
.gfg {
font-size: 40px;
font-weight: bold;
color: green;
}
.geeks {
font-size: 25px;
font-weight: bold;
}
p {
font-size: 20px;
}
</ style >
</ head >
< body >
< div class = "gfg" >
GeeksforGeeks
</ div >
< div class = "geeks" >
HTML5: How to define text
that is no longer correct?
</ div >
< p >
GeeksforGeeks is a
< s >computer science</ s >
portal for geeks
</ p >
</ body >
</ html >
|
Output:
Example 2:
<!DOCTYPE html>
< html >
< head >
< title >
How to define text that
is no longer correct
</ title >
</ head >
< body >
< p >
< s >
Present version of
HTML is HTML 4.01.
</ s >
</ p >
< p >
Next version of
HTML is HTML 5
</ p >
</ body >
</ html >
|
Output:
Supported Browsers:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Last Updated :
03 Jun, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...