Text Edit in HTML

Sometimes, it is useful to show both old and new content together in order to communicate some types of messages more effectively. This is done, for example, when you want to show people what the previous information was, whether for comparison (as in when showing price cuts in sales) or cross-checking (as in when people might be looking for the old information). The elements used to do this are <ins>, <del>, and <s>. Table 3.2 shows the functions of the elements. Figure 3.24 shows their usage, and Figure 3.25 depicts the result.

It is useful to note that even though both the <del> and <s> elements draw a line through their text content, user agents interpret each according to its meaning. A screen reader, for example, will say which it is, so that a blind user can understand.

Source: Sklar David (2016), HTML: A Gentle Introduction to the Web’s Most Popular Language, O’Reilly Media; 1st edition.

Leave a Reply

Your email address will not be published. Required fields are marked *