Detailed explanation of tag for adding strikethrough to HTML text

藏色散人
Release: 2018-10-08 17:00:20
Original
5285 people have browsed it

This article mainly introduces in detail the use of tag in HTML, that is, the implementation method of adding html strikethrough to text text.

I believe that everyone is familiar with the method of adding strikethrough to text. In the previous article [How to set the strikethrough style with css? ] and [How to add strikethrough to text in HTML? ], we have introduced the method of adding strikethrough to everyone. Of course, we all now know that and in HTML4 have been abandoned. If you want to achieve the effect of adding strikethrough to text, you need to pass css or use instead!

Then below we will introduce to you the specific use of the tag through a simple code example.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>HTML<del>删除线代码示例</title>
</head>
<body>
<P>我喜欢的运动是:<del>篮球</del> 跑步</P>
</body>
</html>
Copy after login

The effect is as follows:

Detailed explanation of <del> tag for adding strikethrough to HTML text

The tag here is used to define the deleted text.

And all major browsers support the tag.

Note: Please use it with the tag to describe updates and corrections in the document.

The optional attributes of the tag are:

1, cite, the value is URL, indicating the URL pointing to another document. This document can explain the reason why the text was deleted (no mainstream Browsers support the cite attribute).

2. Datetime, the value is YYYYMMDD, indicating the date and time when the definition text was deleted.

Summary: You can choose to use css to add strikethrough or html tag to add strikethrough according to your own needs.

This article is a detailed explanation of how to use the tag. I hope it will be helpful to friends in need!

The above is the detailed content of Detailed explanation of tag for adding strikethrough to HTML text. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!