<s> Tag Examples
Examples of the <s>
tag in HTML 5
Example <s> tag to strike text
(see <s> tag demo above)
<h6>Avoid mismatched quotes in attribute values</h6> <p>Incorrect: <s><th colspan="3'></s><br/> Correct: <th colspan="3"></p>
Style alternative to the <s> tag
Instead of using the <s> tag to strike out text, a <span> tag with a class
attribute or style
attribute can be used to display the content with a text-decoration: line-through
property.
Avoid mismatched quotes in attribute values
Incorrect: <th colspan="3'>
Correct: <th colspan="3">
With this approach and alternative style sheets the user can change the style. To see this in action in the example above select the "Incorrect code in red" style from the View -> Page Style menu in Firefox or from the View -> Style menu in Opera or IE.