Edit Elements

Learn about HTML edit elements that highlight content modifications, useful for document revision and semantic markup.

Loading...
Edit Elements

Edit elements in HTML, such as <del> and <ins>, are used to indicate changes or revisions in the content.

These tags semantically mark text that has been deleted or inserted, making them useful for version tracking, collaboration, and accessibility.

They are often used in diff tools, blog updates, changelogs, or any place where it's important to show content modifications.

Common elements:


del

The <del> (deleted text) HTML element renders the text that has been deleted from a document.

Most browsers render it with a strike-through style to the text.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>HTML Elements</title>
  </head>
  <body>
    <p>This is <del>deleted</del> text.</p>
  </body>
</html>

The <del> HTML element includes both opening (<del>) and closing (</del>) tags.


ins

The <ins> HTML element defines a text that has been inserted into a web page.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>HTML Elements</title>
  </head>
  <body>
    <p>This is <del>deleted</del> <ins>inserted</ins> text.</p>
  </body>
</html>

The <ins> HTML element includes both opening (<ins>) and closing (</ins>) tags. Attributes for this element are cite (link to a source) and datetime (timestamp of the change).