00 Votes

HTML: Cross out a Word

Question by Guest | 2018-01-17 at 18:46

I would like to  strike through a word in an HTML document. Just as you can do it in a program like Word as formatting, for example.

Is there a corresponding possibility in HTML to format a word or even an entire sentence accordingly?

ReplyPositiveNegative
0Best Answer0 Votes

There are two ways to cross out a word, sentence, or text with HTML. Here are two examples for you:

This <strike>word</strike> is crossed out.

With the HTML tag strike you cross out the enclosing text. It works the same way as <strong> ... </strong> for getting a text bold.

<p style="text-decoration: line-through">
This paragraph is crossed out.
</p>

In addition to the strike tag, you can also work with CSS. If the CSS property text-decoration is set to line-through, the corresponding text will be crossed out. In our example we crossed out a p-paragraph with CSS inline style. Of course, any other element can also be assigned this CSS property to.
2018-01-18 at 15:10

ReplyPositive Negative
Reply

Related Topics

PHP: Sending an E-Mail

Tutorial | 0 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.