Text Formatting

HTML <del> Tag

The <del> tag defines text that has been deleted from a document. Browsers will usually strike a line through deleted text.

Definition and Usage

The <del> tag defines text that has been deleted from a document. Browsers will usually strike a line through deleted text.

Standard Syntax:<del>...</del>

Interactive ExampleRunnable

HTML <del> Example

html
Try it Yourself
Live code demonstration for the <del> tag. Click "Try it Yourself" to edit and experiment in real time.
<div style="font-family: system-ui, sans-serif; padding: 16px; background: #ffffff; border-radius: 8px; border: 1px solid #e2e8f0; color: #0f172a;">
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
</div>

Attributes for <del>

2 Supported Attributes
AttributeValuesDefaultDescription
citeURLnoneSpecifies a URL to a document that explains the reason why the text was deleted/changed
datetimeYYYY-MM-DDThh:mm:ssTZDnoneSpecifies the date and time of when the text was deleted/changed
Global Attributes

The <del> tag also supports the standard global attributes in HTML, including class, id, style, title, hidden, and data-*.

HTML Global Attributes Reference →
Event Attributes

The <del> tag supports event attributes in HTML, such as onclick, onmouseover, onfocus, and more.

HTML Event Attributes Reference →

Browser Compatibility

ChromeEdgeFirefoxSafariOpera

More Tags in Text Formatting

View All 123Tags →