

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to mark strikethrough text in HTML?
To mark strikethrough text in HTML, use the <strike>…</strike> tag. It renders a strikethrough text. HTML deprecated this tag and it shouldn’t be used in HTML5. As an alternative, use the CSS text-decoration property.
To use the CSS property, use the style attribute. The style attribute specifies an inline style for an element. The attribute can be used with the HTML <p> tag. Just keep in mind, HTML5 does not support the <strike> tag, so the CSS style should be used.
Example
You can try to run 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>
Output
- Related Questions & Answers
- Display strikethrough text in HTML
- How to mark deleted text in HTML?
- How to mark inserted text in HTML?
- How to mark text superscript in HTML?
- Strikethrough text with CSS
- How to create a strikethrough text using JavaScript?
- How to mark abbreviation or acronyms in HTML?
- HTML DOM Mark Object
- How to mark work title using cite tag in HTML?
- How to center text in HTML?
- How to set text direction in HTML?
- How to set Text alignment in HTML?
- How to make text bold in HTML?
- How to make text italic in HTML?
- How to change text font in HTML?
Advertisements