Home > Web Front-end > HTML Tutorial > How to mark strikethrough text in HTML?

How to mark strikethrough text in HTML?

WBOY
Release: 2023-08-25 22:45:19
forward
2121 people have browsed it

To mark strikethrough text in HTML, use the tag. It will render a strikethrough text. This tag has been deprecated by HTML and should not be used in HTML5. As an alternative, you can use the CSS text-decoration property.

To use CSS properties, use the style attribute. The style attribute specifies inline styles for the element. This attribute can be used with the HTML

tag. Keep in mind that HTML5 does not support the tag, so CSS styling should be used.

How to mark strikethrough text in HTML?

Example

You can try running the following code to mark strikethrough text in HTML

<!DOCTYPE html>
<html>
<head>
<title>HTML Strikethrough text</title>
</head>

<body>
<h1>Heading</h1>
<p style="text-decoration: line-through;">
Strikethrough text
</p>
</body>
</html>
Copy after login

Output

How to mark strikethrough text in HTML?

The above is the detailed content of How to mark strikethrough text in HTML?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:tutorialspoint.com
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