What are the <ins> and <del> tags used for?

What are the <ins> and <del> tags used for and does anyone really use them?

The <ins> (for insert) and <del> (for delete) tags are used to track changes in a document. They are rarely used tags, but could be useful as part of content management system or similar tool.

Both tags take a datetime attribute that takes a value in the form of:


For example:


See https://www.w3.org/TR/NOTE-datetime for details on that datetime format.

Here's a simple example of how you might use <ins> and <del>:

<p>Mike and <del datetime="2016-06-14T15:28:03+05:00"
  <ins datetime="2016-06-14T15:28:03+05:00">I</ins>
  went to the movies last night.</p>

The cite attribute doesn't have any effect on the display of the content. It really just serves as a comment for the coders. Most browsers will put a line though content in <del> tags and underline content in <ins> tags, like this:

ins and del tags

Do these ever actually get used? Well, Google uses the <ins> tag on its 404 page, but we're not really sure why.

Author: Nat Dunn

Nat Dunn is the founder of Webucator (www.webucator.com), a company that has provided training for tens of thousands of students from thousands of organizations. Nat started the company in 2003 to combine his passion for technical training with his business expertise, and to help companies benefit from both. His previous experience was in sales, business and technical training, and management. Nat has an MBA from Harvard Business School and a BA in International Relations from Pomona College.

Follow Nat on Twitter at @natdunn and Webucator at @webucator.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.