×

Highlighting Changes: del and ins tags [13/17]

Any document on the Web has its "lifecycle". As Web apps gain more dynamics, modifying of HTML documents becomes easier than ever.

Sometimes we wonder, what exactly has changed in a document? What particularly has been added to it or removed from it?

For this purpose, HTML offers two tags, <del> and <ins>.

The <del> tag represents a removal from the document.

The <ins> tag represents an addition to the document.

Both tags have the datetime attribute to set the date and time of a revision.

A simple and intuitive example of such tags is a list of errors. When an error is fixed, it is tagged by <del>. If a new error has been found, it is added to the list and tagged by <ins>.

The datetime attribute is intended for computers rather than for people, so date and time is specified in a standardized format. Such markup makes it easier for a program to analyze document changes.

Do it
HTML
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>del and ins Tags</title> </head> <body> <h1>Error List, as of 05/06/2015</h1> <ul> <li><del datetime="2015-05-07">Menu items cram together.</del></li> <li>Invalid font size in the title.</li> <li>Logo has not been updated.</li> <li><ins datetime="2015-05-08">Errors in the texts</ins>.</li> <li>Layout collapses at the minimum width.</li> </ul> </body> </html>
CSS
HTML Academy
  1. Use the del tag to mark one more error as fixed
  2. and the ins tag to mark another error as newly added.
Theory Check Next