Sometimes it is necessary to document changes in your HTML pages. This is especially common when drafting legal documents. The specification provides
<del> elements for documenting inserted and deleted content, respectively. Both elements take a
cite attribute for pointing to a resource explaining the change and a
datetime attribute for indicating the time and date of the change.
title attribute can also be used to indicate a short reason for the change. The example below shows how they are used:
<!DOCTYPE HTML> <html lang="en"> <head> <meta charset="UTF-8"> <title>Change Tracking</title> </head> <body> <h1>Change Tracking</h1> <p>The baseball player with the most home runs is <del datetime="2015-08-01" cite="http://mlb.mlb.com" title="Not anymore">Hank Aaron</del><ins datetime="2015-08-07" cite="http://mlb.mlb.com" title="Steroids?">Barry Bonds</ins>.</p> </body> </html>
The page is rendered as follows. The title text shows up when the user hovers the mouse over the text "Hank Aaron.":