Date First Published: 26th February 2023
Topic: Web Design & Development
Subtopic: Web Development
Article Type: Computer Terms & Definitions
Difficulty: MediumDifficulty 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.
An example of the <del> tag with the output can be seen below:
Output:
This is normal text
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.
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. |
If so, it is important that you tell me as soon as possible on this page.
Network Services Network Setups Network Standards Network Hardware Network Identifiers Network Software Internet Protocols Internet Organisations Data Transmission Technologies Web Development Web Design Web Advertising Web Applications Web Organisations Web Technologies Web Services SEO Threats To Systems, Data & Information Security Mechanisms & Technologies Computer Hardware Computer Software Ethics & Sustainability Legislation & User Data Protection