Tag HTML <del>


Exemplo

Um texto com uma parte excluída e uma nova parte inserida:

<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>

Mais exemplos de "Experimente você mesmo" abaixo.


Definição e uso

A <del>tag define o texto que foi excluído de um documento. Os navegadores geralmente riscam uma linha através do texto excluído.


Dicas e Notas

Dica: Observe também a tag <ins> para marcar o texto inserido.


Suporte ao navegador

Element
<del> Yes Yes Yes Yes Yes

Atributos

Attribute Value Description
cite URL Specifies a URL to a document that explains the reason why the text was deleted/changed
datetime YYYY-MM-DDThh:mm:ssTZD Specifies the date and time of when the text was deleted/changed

Atributos Globais

A <del>tag também suporta os Atributos Globais em HTML .


Atributos do evento

A <del>tag também suporta os atributos de evento em HTML .



Mais exemplos

Exemplo

Use CSS para estilizar <del> e <ins>:

<html>
<head>
<style>
del {background-color: tomato;}
ins {background-color: yellow;}
</style>
</head>
<body>

<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>

</body>
</html>

Páginas relacionadas

Referência HTML DOM: Del Object


Configurações padrão de CSS

A maioria dos navegadores exibirá o <del>elemento com os seguintes valores padrão:

Exemplo

del {
  text-decoration: line-through;
}