
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mark Deleted Text in HTML
We use <del> tag, to delete a text in HTML. This tag mark strike on the text which is to be delete from the document.
We can also use the style attribute, to strike a text in HTML. The style attribute specifies an inline style for an element. This attribute is used inside the HTML <p> tag, with the CSS property text-decoration property.
Syntax
Following is the syntax to delete a text in HTML.
<del> The content to be deleted </del>
Example
Following is the example program to delete a text in HTML.
<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for<del>Delhi Land and Finance.</del></p> <p>Delhi Land and Finance is one of the largest commercial real estate developer in India.</p> </body> </html>
Example
In the example below, we used <del> tag on a particular text inside the <h1> tag.
<!DOCTYPE html> <html> <head> <title>HTML u tag</title> </head> <body> <h1>Welcome to <del> Disney land </del> Kids.</h1> </body> </html>
Marking deleted text by inline CSS
Using CSS property for deleting a text in HTML.
Syntax
Following is the syntax to delete a text in HTML using CSS property.
<p style="text decoration:line-through;">The content to be underlined</p>
Example
Following is the example program to delete a text in HTML using CSS property.
<!DOCTYPE html> <html> <head> </head> <body> <p>DLF stands for</p><p style="text-decoration:line-through;">Delhi Land and Finance</p> <p>Delhi Land and Finance is one of the largest commercial real estate developer in India.</p> </body> </html>
Advertisements