Skip to: content, navigation

by Ian Lloyd

strike (HTML element)

Spec
Depr. Empty Version
Yes No HTML 4
Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Full Full Full Full

Example

strike being used to scrub out a person’s initial impression of someone:

<p><strike>The guy is a fool.</strike> The guy is an absolute
genius. What was I thinking?</p>
Type
inline element
Contains
inline elements only
Contained by
block-level elements, inline elements

Description

The strike element will create a horizontal strike (or line) straight through any enclosed text and white space. It provides no semantic meaning about the text affected (thus it’s similar to b or i in that respect).

If the intention when using strike is to signify a real change to the document, then the appropriate markup to use is a combination of the del element and ins elements.

Normally, though, this element is used for purely presentational reasons rather than document change logging. It is used even more frequently for the purposes of a cheep gag - saying something and intentionally leaving it on screen, but with a strike-through for comedic effect.

The strike element replaces the s element which was defined in HTML 3 but dropped in HTML 3.2. Both s and strike are deprecated in HTML4.

The example shown would render as follows:

Example of strike element

Use this for…

You may use this element as a typographical convention for when you intentionally say something, but then say the opposite and wish for both to be seen. Note that using this will cause your page to be invalid in HTML 4.1/XHTML 1, 1.1. If the strikethrough is purely for presentational effect, you should use CSS to style the affected text instead of using this element.

Compatibility

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full
9.5Full

The strike element has full browser support.

User-contributed notes

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters