Home > Web Front-end > HTML Tutorial > How to set strikethrough in html

How to set strikethrough in html

醉折花枝作酒筹
Release: 2023-01-05 16:07:41
Original
18529 people have browsed it

Method: 1. Use the "text-decoration" attribute to specify the modification of the text (such as underline, strikethrough, etc.), the syntax "text-decoration:line-through"; 2. Use the del tag to define the text in the document Deleted text, syntax "text".

How to set strikethrough in html

The operating environment of this tutorial: Windows7 system, CSS3&&HTML5 version, Dell G3 computer.

Let’s take a look at text-decoration first

text-decoration is usually used to modify the decorative effect of links (Note: This attribute allows you to set some effect on the text. Such as underlining. If the descendant element does not have its own decoration, the decoration set on the ancestor element will "extend" to the descendant element.

##underline Define a line under the text. The underline is also the one that comes with our links overlineDefine a line over text. line- throughDefine a line that passes under the text.

Value

Description

##none

Default. Defines the standard text.

You can also use To implement strikethrough

The code is shown below (to prevent confusion, overline has also been tested. If the description is unclear, you will think that strikethrough can be achieved)

Effect

Recommended learning:

html video course

The above is the detailed content of How to set strikethrough in html. 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