HTML - tags - s tag

revision:


Content

"s" tag : specifies that text is no longer relevant or correct syntax some examples


"s" tag : specifies that text is no longer relevant or correct

top

The <s> tag specifies text that is no longer correct, accurate or relevant. The text will be displayed with a line through it. Browsers usually render <s> text with a line through the middle. This resembles text that has been "crossed out" due to it being no longer accurate or relevant.

The <s> tag should not be used to define deleted text in a document, use the <del> tag for that.

Attributes : this element includes the global attributes.


syntax

top

<s> . . . irrelevant/inacurrate text . . . </s>


some examples

top

Only 50 tickets left!

SOLD OUT!

code: 
                <p class="example"><s>Only 50 tickets left!</s></p>
                <p class="example">SOLD OUT!</p>
            

Great coffee from just $50 $20!

coding: 
                <p class="example">Great coffee from just <s>$50</s> $20!</p>
            

I am studying in high school.

I am studying in an university.

code: 
                <div class="spec">
                    <p class="example"><s>I am studying in high school.</s></p>
                    <p class="example">I am studying in an university.</p>
                </div>
            
Today's Special: Salmon SOLD OUT
Today's Special: Salmon SOLD OUT
code: 
                <div class="spec">
                    <s class="example">Today's Special: Salmon</s> SOLD OUT<br>
                    <span class="example" style="text-decoration:line-through;">Today's Special: Salmon</span> SOLD OUT
                </div>