Today we will learn about HTML <del> Tag and how it is used. Delete tag is used to represent a series of deleted/removed text from a document. It is used as a markup for deleted content. The browser usually renders the line by striking out the deleted text, although this can be changed using the CSS property.

HTML <del> Tag

Example1:-


 <html>  
 <head>  
   <title>HTML Del tag</title>  
 </head>  
 <body>  
   <h1>Example of HTML Del tag</h1>  
   
   <h3>I <del>LOVE</del> YOU </h3>
   <p>I <del>LOVE</del> YOU</p>
  </body>  
</html>  

Output:-

HTML Del Tag with CSS Property

Example2:-


 <html>  
 <head>  
   <title>HTML Del tag</title>  
   <style>
     del{
      background: red;
     }
   </style>
 </head>  
 <body>  
   <h1>Example of HTML Del tag</h1>  
   
   <h3>I <del>LOVE</del> YOU </h3>
   <p>I <del>LOVE</del> YOU</p>
  </body>  
</html>  

Output:-

Note:- To identify the deleted text and inserted text use <ins> tag with <del> which will display deleted and inserted text in a document.

Attributes

cite

DateTime

HTML Mark Tag

HTML <mark> Tag

The HTML <mark> Tag is a very useful Tag. HTML <mark> Tag is used to highlight some text part inside another element such as paragraph, reference, or for any notation purpose.

This is a newly added tag and introduced in HTML5.

In most browsers, text with a <mark> Tag renders with a yellow background, but this can be changed color using the CSS background-color property.

Example:-

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>HTML Mark Tag</title>
</head>
 
<body>
  <h1>This is HTML Mark Tag</h1>
 
 <p>This Is <mark>Mark Tag Example</mark></p>
</body>
</html>

Output:-

This Is Mark Tag Example

HTML S Tag

HTML <s> Tag

The HTML <s> Tag is used to represent text that is no longer accurate or relevant in some way. Meaning text written between the <s> (start) and </s> (end) Tags to form a line on the text, renders as a strike through the text.

Note:- Don’t get confused with <del> and <s> Tags because <del> is used for text that is removed or removed from the document and <s> represents text that is no longer accurate.

Example:-

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>HTML s tag</title>
</head>
<body>

<h1>This is HTML s Tag Example</h1>
 
 My Name is <s>Khushal</s>.
 <p><s>Only 50 tickets left!</s></p>
<p>SOLD OUT!</p>
</body>
</html>

Output:-

My Name is Khushal.

Only 50 tickets left!

SOLD OUT!


Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *