Consent

This site uses third party services that need your consent.

Skip to content
Steven Roland
  • Del Element: Indicating Deleted Content

    The <del> HTML element is used to represent a range of text that has been deleted from a document. This element is useful for indicating changes in content, such as revisions or updates, where it is important to show what text was removed. By default, browsers render the text inside a <del> element with a strikethrough, visually indicating that the content is no longer valid or has been superseded by new information.

    The <del> element can include the cite and datetime attributes to provide additional context about the deletion. The cite attribute specifies a URL to a document or resource that explains the reason for the deletion, while the datetime attribute indicates the date and time when the deletion occurred. These attributes help provide a more comprehensive understanding of the changes made to the document. Here is an example of how the <del> tag can be used:

    <p>The price of the product was <del>$29.99</del> <ins>$24.99</ins>.</p>

    Valid Attributes for <del>

    Attribute Description
    cite Specifies a URL to a document that explains the reason for the deletion.
    datetime Indicates the date and time when the deletion occurred, in a valid date-time format.

    The <del> element supports all global attributes, allowing for additional customization and interaction through CSS and JavaScript. It is a valuable tool for tracking changes in a document and providing users with a clear visual indication of content that has been removed.