<s> Tag in HTML | Text Formatting

The <s> tag in HTML is used to indicate text that is no longer accurate or relevant. The text enclosed within this tag is typically displayed with a strikethrough effect.

Key Points on <s> Tag:

Syntax of <s> Tag:

Syntax Example

<s>Text to be struck through</s>

Example of <s> Tag in HTML:

This example demonstrates the usage of the <s> tag to show text with a strikethrough effect.

Code Example

<!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>HTML <s> Tag Example</title>
        </head>
        <body>
            <h1>HTML <s> Tag Example</h1>
            <p>
                This is a regular sentence. <s>This part is no longer relevant</s> and should be struck through.
            </p>
        </body>
        </html>

Output

Example

This is a regular sentence. This part is no longer relevant and should be struck through.

The <s> tag is used to visually indicate that some text is no longer valid or relevant, typically by showing a strikethrough. It is often used for corrections, deletions, or updates in content, though it does not imply any semantic meaning.