- Adding a Paragraph
- Specifying Fine Print
- Marking Important and Emphasized Text
- Creating a Figure
- Indicating a Citation or Reference
- Quoting Text
- Specifying Time
- Explaining Abbreviations
- Defining a Term
- Creating Superscripts and Subscripts
- Adding Author Contact Information
- Noting Edits and Inaccurate Text
- Marking Up Code
- Using Preformatted Text
- Highlighting Text
- Creating a Line Break
- Creating Spans
- Other Elements
Noting Edits and Inaccurate Text
Sometimes you may want to indicate content edits that have occurred since the previous version of your page. There are two elements for noting edits: the ins element represents content that has been added, and the del element marks content that has been removed ( through ). You may use them together or individually.
One item (the bicycle) has been added to this gift list since it was previously published, and purchased items have been removed, as noted by the del elements. You are not required to use del each time you use ins, or vice versa. Browsers differentiate the contents of each element visually by default .
Browsers typically display a line through deleted text, and they typically underline inserted text. You can change these treatments with CSS.
Both del and ins are rare in that they can surround both phrasing content (“inline” content, in pre-HTML5 parlance) and blocks of content like entire paragraphs or lists, as shown here.
Meanwhile, the s element notes content that is no longer accurate or relevant (it’s not for edits) ( and ).
This example shows an ordered list (the ol element) of show times. The time slots for which ticket availability is no longer relevant have been marked with the s element. You can use s around any phrases, not just around text within list items (li elements), but you cannot use it around a whole paragraph or other “block-level” element like you can with del and ins.
The s element renders as a strikethrough by default in browsers.
To mark newly inserted text
- Type <ins>.
- Type the new content.
- Type </ins>.
To mark deleted text
- Place the cursor before the text or element you wish to mark as deleted.
- Type <del>.
- Place the cursor after the text or element you wish to mark as deleted.
- Type </del>.
To mark text that is no longer accurate or relevant
- Place the cursor before the text you wish to mark as no longer accurate or relevant.
- Type <s>.
- Place the cursor after the text you wish to mark.
- Type </s>.