Documenting Changes

Welcome to our free HTML tutorial. This tutorial is based on Webucator's Introduction to HTML Training course.

Contact Us or call 1-877-932-8228
Documenting Changes

Documenting Changes

Sometimes it is necessary to document changes in your HTML pages. This is especially common when drafting legal documents. The specification provides <ins> and <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. The title attribute can also be used to indicate a short reason for the change. The example below shows how they are used:

Code Sample:

Text/Demos/ChangeTracking.html
<!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>

Code Explanation

The page is rendered as follows. The title text shows up when the user hovers the mouse over the text "Hank Aaron.":Change Tracking Page Result

Next

This tutorial is based on Webucator's Introduction to HTML Training Course. We also offer many other HTML Training courses. Sign up today to get help from a live instructor.