W3docs

Etiqueta HTML <strike>

The HTML <strike> tag defines a strikethrough text. It is a typographical presentation of words with a horizontal line through the center. The tag is not supported in HTML5.

La etiqueta <strike> se utiliza para definir texto tachado.

danger

El elemento <strike> es una etiqueta HTML obsoleta y no está soportada en HTML5. Utiliza <del>, <s> o estilos CSS en su lugar.

Para crear un texto tachado, también puedes usar la propiedad CSS text-decoration: line-through;.

CSS es excelente para el estilo, pero no transmite el significado semántico de tu contenido. Por eso, es mejor usar etiquetas semánticas de HTML.

Tanto las etiquetas <s> como <del> muestran texto tachado, pero transmiten significados diferentes sobre el contenido. La etiqueta <s> se utiliza si deseas representar algo que ya no es preciso o relevante. No deberías usarla para indicar ediciones en el documento. Si quieres indicar algo que se ha eliminado del documento, utiliza <del>.

Sintaxis

La etiqueta <strike> se usa en pares. El contenido se escribe entre las etiquetas de apertura (<strike>) y cierre (</strike>).

Ejemplo de la etiqueta HTML <strike>:

Etiqueta HTML <strike>

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <p><strike>I am studying at the school.</strike></p>
    <p>I am studying at the university.</p>
  </body>
</html>

Resultado

strike example

Cómo dar estilo a una etiqueta HTML <strike>

strike {
  text-decoration: line-through;
}

Práctica

Práctica

What is the correct usage of the HTML &lt;strike&gt; tag, and how is it rendered by modern browsers?