HTML <s>
Tag
Topic: HTML5 Tags ReferencePrev|Next
Description
The <s>
tag displays the enclosed text in strikethrough style i.e. with a line drawn through it (same as <strike>
but introduced by later browser versions).
The following table summarizes the usages context and the version history of this tag.
Placement: | Inline |
---|---|
Content: | inline and text |
Start/End Tag: | Start tag: required, End tag: required |
Version: | HTML 4, 4.01, 5 |
Note: The <s>
tag was deprecated in HTML 4, but it has been redefined in HTML5. However, use the <del>
tag instead if enclosed text represents deleted text, otherwise use the CSS text-decoration
property, with the line-through
value.
Syntax
The basic syntax of the <s>
tag is given with:
The example below shows the <s>
tag in action.
Example
Try this code »<p>Here is some <i>strikethrough</i> text.</p>
Tag-Specific Attributes
The <s>
tag doesn't have any specific attribute.
Global Attributes
Like all other HTML tags, the <s>
tag supports the global attributes in HTML5.
Event Attributes
The <s>
tag also supports the event attributes in HTML5.
Browser Compatibility
The <s>
tag is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Text Formatting, CSS Text
Related tag: <strike>
.