how to use the <del> tag in HTML

What is The del tag
✷ The <del> tag in HTML is used to show text that has been deleted or removed from a webpage. When you use this tag, the text usually appears with a line through it (strikethrough), which clearly indicates that the content is no longer correct or has been updated.
✷ The syntax of the <del> tag is very simple:
<del>Deleted text</del>
✷ This tag is very useful when you want to show changes in content instead of completely removing the old text. For example, if a product price changes, you can display the old price as deleted and show the new price next to it:
✷ <p>Price: <del>$50</del> $30</p>
✷ users can easily understand that the price was reduced from $50 to $30.
✷ The <del> tag also supports attributes like datetime, which shows when the text was deleted, and cite, which can provide a reason or reference for the change.
✷ One important thing to remember is that <del> is a semantic tag. This means it not only changes the appearance but also gives meaning to the content, helping browsers and search engines understand that the text has been removed.
Syntax :-
<del> text content</del>
how to use the <del> tag in HTML
Example
<!DOCTYPE html>
<html>
<body>
<h2> how to use Inserted text tag in html</h2>
<p>student learn <del> HTML </del> programming language</p> <p> Student learn <del>CSS</del> Programming language</p>
</body>
</html>
how to use the <del> tag in HTML
Explain Program
Step 1 ]
<!Doctype html>
<!doctype html> always be the first line of any HTML document.
Step 2 ]
<html> and </html>
html is the root element.
Step 3 ]
<body> and </body>
body is main content area.
All visible content inside to the <body> tag
Step 4]
<h2> how to use Inserted text tag in html</h2>
<h2> ... </h2>
<h2> use subheading to describe the topic of page. Step 5]
<p>student learn <del> HTML </del> programming language</p>
<p> defines a paragraph tag
normal text plus <del> tag
<del> HTML</del> HTML is marked as deleted text.
deleted text with strikethrough line
Step 5]
<p> Student learn <del>CSS</del> Programming language</p>
<p> defines a paragraph tag
normal text plus <del> tag
<del> CSS</del> HTML is marked as deleted text.
deleted text with strikethrough line
Step 6]
how to use the <del> tag in HTML
Output
Related Post :-
Comments
Post a Comment