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

Analysis of Linux kernel scheduler source code initialization

Table of contents 1. Introduction 2. Basic Concep...

Docker image creation Dockerfile and commit operations

Build the image There are two main ways to build ...

How to visualize sketched charts in Vue.js using RoughViz

introduce A chart is a graphical representation o...

Copy the contents of one file to the end of another file in linux

Problem description: For example, the content of ...

Simple steps to write custom instructions in Vue3.0

Preface Vue provides a wealth of built-in directi...

How to create a file system in a Linux partition or logical volume

Preface Learn to create a file system on your sys...

Implementation of docker-compose deployment project based on MySQL8

1. First, create the corresponding folder accordi...

Detailed explanation of Linux environment variable configuration strategy

When customizing the installation of software, yo...

About CSS floating and canceling floating

Definition of Float Sets the element out of the n...

Use simple jQuery + CSS to create a custom a tag title tooltip

Introduction Use simple jQuery+CSS to create a cus...

Detailed explanation of MySQL 8.0.18 commands

Open the folder C:\web\mysql-8.0.11 that you just...

Improvement experience and sharing of 163 mailbox login box interactive design

I saw in the LOFTER competition that it was mentio...