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

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

This article mainly introduces to you the specific use ofHTML strikethroughtags.

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 thetaginHTML to add a strikethrough in the middle of text!

html strikethrough codeThe example is as follows:

    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 thetagin html.

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

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).

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

Note:

In HTML 4.01, thetag is deprecated.

In XHTML 1.0 Strict DTD, thetag is not supported.

Suggestion:

Please useinstead!

In the follow-up article [Detailed explanation of adding strikethrough to HTML texttag], we will introduce how to use thetag, 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
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!