Computerhelp4all logo Articles AboutTopicsQuizzesComputer Questions & AnswersComputer Terms & DefinitionsActivitiesContact

What Is The HTML <del> Tag?

What Is The HTML Del Tag

Date First Published: 26th February 2023

Topic: Web Design & Development

Subtopic: Web Development

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 5/10

Learn more about what the HTML <del> tag is in this article.

In HTML, the <del> tag is used to define text that has been deleted from a document. Deleted text is indicated by a horizontal line striked through the text. By default, the web browser will strike a line through it, but this can be changed using CSS. This tag is supported by all major web browsers. This tag was removed from the HTML4 specification, but was reintroduced in HTML5 as a way of marking something that is incorrect.

Example Of The <del> Tag

An example of the <del> tag with the output can be seen below:

<p>This is normal text</p> <del>This is text that has been deleted</del>

Output:

This is normal text

This is strikethrough text

Difference Between The <del> and <s> Tag

Although both tags perform the same function, they semantically represent different things. The main difference between the <del> and <s> tag is that the <del> tag is used to define text that was in the document, but has been deleted and the <s> tag is used to define text that was no longer accurate or correct in some way in the document, but has not been deleted or removed. It is unlikely that using these tags has an effect on how content is indexed in search engines, but it is best to create content that is semantically correct and use both tags appropriately.

Attributes

Below are the attributes for the <del> tag.

Attribute Description
cite Specifies the URL to a document that explains why text was deleted.
datetime Specifies the date and time the text was deleted.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.


Comments