insanddelIt was introduced in html4.0, which can help creators cooperate with each other when developing documents, and also maintain some editing (for example, it can reflect that the creator modifies the document and how to think) and version control components (with the help of software, the document can be restored to the state at a specific time).
Ins andDel attribute
cite: the attribute value is the URI of a document or information resource. This attribute is to indicate why the interpretation information of the document is changed
datetime: the attribute value specifies the date and time when the modification occurs
W3C explanation on del and INS:
INS and DEL are used to markup sections of the document that have been inserted or deleted with respect to a different version of a document (e.g., in draft legislation where lawmakers need to view the changes).
These two elements are unusual for HTML in that they may serve as either block-level or inline elements (but not both). They may contain one or more words within a paragraph or contain one or more block-level elements such as paragraphs, lists and tables.
Del defines the deleted text content in the document, and INS is used to describe the update and correction in the document. The default style of del browser is strikethrough, and INS is underlined by default. This can also explain the usage of the two. Usually, the two elements are used together.
Ins andDel usage
In HTML, the ins and del elements can be used as both block level elements and inline elements, but they cannot be used as both elements at the same time. Therefore, they can contain one or more text in a paragraph, or several block level elements, such as paragraph (P), list (UL, ol, DL), table, etc.
<p>I have < del cite=“ http://www.baikelu.com/ ” datetime=”20070515T192525+08:00″>2</del><ins cite=” http://www.baikelu.com/ “Datetime =” 20070515t192525 + 08:00 “> 3 < / INS > cents</p>
< del title = “just lost” datetime = “20070515t192525 + 08:00” > < p > I have three cents < / P > < / del >
The creator can comment on the inserted or deleted elements through the title attribute, and the user agent (such as the browser) may display this information to the user
<p>< del title = “just lost” datetime = “20070515t192525 + 08:00” > < div > < p > I have three cents < / P > < / div > < / del ></p>
This is a mistake, that is, ins and del cannot be both block level elements and inline elements at the same time
The display effect of ins and del on the page can be controlled through CSS