Attributes and usage of ins and del tags

Attributes and usage of ins and del tags
ins and del were introduced in HTML 4.0 to help authors collaborate when developing documents, and also retain some editing (for example, it can reflect how the author modified the document over a period of time and how he thought) and version control components (with the help of software, the document can be restored to its state at a specific time).

ins and del attributes

cite : The attribute value is a URI of a document or information resource. This attribute is used to indicate why the explanation of this document is changed.

datetime : The attribute value clearly and in detail describes the date and time when the modification occurred.


W3C's explanation of 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 (eg, 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 text content that has been deleted in the document, and ins is used to describe updates and corrections in the document. The default browser style of del is deleted, and the default style of ins is underlined. This can also well illustrate the usage of the two. Usually the two elements are used together.

Usage of ins and del

In HTML, the ins and del elements can be either block-level elements or inline elements, but not both at the same time. So they can contain one or several words in a paragraph, or they can contain several block-level elements like paragraphs (p), lists (ul, ol, dl), tables (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 3 cents</p></del>

Authors can use the title attribute to comment on inserted or deleted elements, and user agents (such as browsers) may display this information to users.

<p><del title="Just lost" datetime="20070515T192525+08:00"><div><p>I have 3 cents</p></div></del></p>

This is an incorrect way of writing, that is, ins and del cannot be both block-level elements and inline elements at the same time.

The display effects of ins and del on the page can be controlled by CSS

<<:  Design of pop-up windows and floating layers in web design

>>:  MySQL 5.7.33 installation process detailed illustration

Recommend

Using an image as a label, the for attribute does not work in IE

For example: Copy code The code is as follows: <...

MYSQL performance analyzer EXPLAIN usage example analysis

This article uses an example to illustrate the us...

A detailed tutorial on how to install Jenkins on Docker for beginners

Jenkins is an open source software project. It is...

Summary of some HTML code writing style suggestions

Omit the protocol of the resource file It is reco...

MySQL Order By Multi-Field Sorting Rules Code Example

Say it in advance On a whim, I want to know what ...

React Principles Explained

Table of contents 1. setState() Description 1.1 U...

How to configure Bash environment variables in Linux

Shell is a program written in C language, which i...

js to realize web music player

This article shares simple HTML and music player ...

Use of Linux watch command

1. Command Introduction The watch command execute...

Detailed tutorial on using cmake to compile and install mysql under linux

1. Install cmake 1. Unzip the cmake compressed pa...

Detailed explanation of writing and using Makefile under Linux

Table of contents Makefile Makefile naming and ru...

Vue implements two routing permission control methods

Table of contents Method 1: Routing meta informat...