HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>Many people use a To-do list to organise their work (or even their leisure). A To-do list allows you to easily keep track of completed tasks and add new ones. How can you mark up such a change history using HTML?</p>
1 <p>Many people use a To-do list to organise their work (or even their leisure). A To-do list allows you to easily keep track of completed tasks and add new ones. How can you mark up such a change history using HTML?</p>
2 <p>The tags &lt;del&gt; (which is short for “delete”) and &lt;ins&gt; (which is short for “insert”) are intended to be used to describe such changes.</p>
2 <p>The tags &lt;del&gt; (which is short for “delete”) and &lt;ins&gt; (which is short for “insert”) are intended to be used to describe such changes.</p>
3 <p>The &lt;del&gt; tag is used to highlight text that has been deleted in the new version of the document. This text is displayed as being crossed-out in the browser.</p>
3 <p>The &lt;del&gt; tag is used to highlight text that has been deleted in the new version of the document. This text is displayed as being crossed-out in the browser.</p>
4 <p>The &lt;ins&gt; tag is used to highlight text that has been added in the new version of the document. This text is displayed as being underlined in the browser.</p>
4 <p>The &lt;ins&gt; tag is used to highlight text that has been added in the new version of the document. This text is displayed as being underlined in the browser.</p>
5 <p>Both tags have a datetime attribute that lets you specify the date and time when this or that edit was made.</p>
5 <p>Both tags have a datetime attribute that lets you specify the date and time when this or that edit was made.</p>
6 <p>The to-do list is the simplest example of how these tags are used. When an item on the list has been completed, it is marked using the &lt;del&gt; tag, but if a new item has been added to the list, then it is added to the list and marked with the &lt;ins&gt; tag.</p>
6 <p>The to-do list is the simplest example of how these tags are used. When an item on the list has been completed, it is marked using the &lt;del&gt; tag, but if a new item has been added to the list, then it is added to the list and marked with the &lt;ins&gt; tag.</p>
7 &lt;ul&gt; &lt;li&gt;Clean the dishwasher&lt;/li&gt; &lt;li&gt;&lt;del datetime="2009-10-11T01:25-07:00"&gt;Take a walk&lt;/del&gt;&lt;/li&gt; &lt;li&gt;&lt;del datetime="2009-10-10T23:38-07:00"&gt;Take a nap&lt;/del&gt;&lt;/li&gt; &lt;li&gt;&lt;ins&gt;Buy a printer&lt;/ins&gt;&lt;/li&gt; &lt;/ul&gt;<p>The datetime attribute is not intended for human consumption, but rather for computers. Therefore, the date and time are written there in a standardized format. When you use such markup, it is easier for programs to parse documents and analyze when certain changes have occurred.</p>
7 &lt;ul&gt; &lt;li&gt;Clean the dishwasher&lt;/li&gt; &lt;li&gt;&lt;del datetime="2009-10-11T01:25-07:00"&gt;Take a walk&lt;/del&gt;&lt;/li&gt; &lt;li&gt;&lt;del datetime="2009-10-10T23:38-07:00"&gt;Take a nap&lt;/del&gt;&lt;/li&gt; &lt;li&gt;&lt;ins&gt;Buy a printer&lt;/ins&gt;&lt;/li&gt; &lt;/ul&gt;<p>The datetime attribute is not intended for human consumption, but rather for computers. Therefore, the date and time are written there in a standardized format. When you use such markup, it is easier for programs to parse documents and analyze when certain changes have occurred.</p>