How to add strikethrough to text in HTML? (code example)

藏色散人
Release: 2018-10-08 17:01:46
Original
17221 people have browsed it

This article mainly introduces to you the specific use of HTML strikethrough tags.

In the previous article [How to set the strikethrough style with css? ], we have introduced to you the specific implementation method of realizing the strikethrough style through CSS. Friends in need can go and refer to it.

Let’s use a simple code example to introduce how to use the tag in HTML to add a strikethrough in the middle of text!

html strikethrough codeThe example is as follows:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>html删除线代码示例</title>

</head>
<body>
    <s>这段文字已经被删除</s>
</body>
</html>
Copy after login

The code implementation effect is as follows:

How to add strikethrough to text in HTML? (code example)

We can already see from the picture that this text has been struck through. Here we mainly use the tag in html.

As in the above code, just write the text that needs to be strikethrough directly in the tag!

Summary:

The tag is a definable strikethrough text definition, that is, the modified text content will be strikethrough (a line in the middle of the text).

The tag is the abbreviated version of the tag, which is supported by both Netscape and Internet Explorer.

Note:

In HTML 4.01, the tag is deprecated.

In XHTML 1.0 Strict DTD, the tag is not supported.

Suggestion:

Please use instead!

In the follow-up article [Detailed explanation of adding strikethrough to HTML text tag], we will introduce how to use the tag, please Stay tuned everyone!

This article is an introduction to the implementation method of HTML strikethrough. It is very easy to understand. I hope it will be helpful to friends in need!

The above is the detailed content of How to add strikethrough to text in HTML? (code example). 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!