4. Strike vs Delete vs S tag
<strike> is an old HTML element used to display crossed-out text (a line drawn through the text). It makes text look deleted or obsolete, but it has no specific semantic meaning.
Key features:
- Visual effect only → crossed-out text
- HTML5 replaced `<strike>` with `<s>`
The <s> tag is an HTML element used to display crossed-out (strikethrough) text that is not an actual deletion. It shows that the text is no longer in use or is obsolete, but it may still be useful in some context.
Key features:
- Visual only → shows a line through the text
- Should be used for old, outdated, or obsolete text
- HTML5 replaced `<strike>` with `<s>`
<del> is an HTML element used to display text that has been removed from the content. It has semantic meaning: it indicates that the text has been "deleted" from a document, version, or content history.
Key features:
- Visual: crossed-out text
- Semantic: users, browsers, and screen readers can understand that the text was deleted
- Useful for: document versioning, edits, tracking changes
Source Code:
<!DOCTYPE html>
<html>
<head>
<title>Strike Text Examples</title>
</head>
<body>
<h2>HTML Strike Examples</h2>
<!-- Using <s> -->
<p>This is <s>struck-through text using <s></s></p>
<!-- Using <del> -->
<p>This is <del>deleted text using <del></del></p>
<!-- Using <strike> (deprecated) -->
<p>This is <strike>old strike text using <strike></strike></p>
</body>
</html>Result:
Watch the video:


