Introduction to <del>tag

The <del>element is typically rendered by browsers with a strikethrough style, which helps readers easily identify content that has been removed or is no longer applicable. This visual cue makes it clear that the text should be considered obsolete or invalid, while still allowing readers to see what the original content was.

Copy to clipboard
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Product Features with Del Tag Example</title>
<link rel="stylesheet" href="styles.css"> <!-- Link to external CSS file -->
</head>
<body>
<div class="container">
<h1>Product Features Update</h1>
<ul class="feature-list">
<li>High-Resolution Display</li>
<li><del>3G Connectivity</del></li> <!-- Feature marked as removed -->
<li>4G LTE Connectivity</li>
<li>Bluetooth 5.0</li>
<li><del>16GB Internal Storage</del></li> <!-- Feature marked as removed -->
<li>64GB Internal Storage</li>
<li>Water Resistant up to 2 meters</li>
<li>Fast Charging Support</li>
</ul>
</div>
</body>
</html>
Copy to clipboard
/* General Styles */
    body {
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        background-color: #f8f9fa; /* Light gray background for the page */
        color: #333;
        margin: 0;
        padding: 20px;
    }
    
    .container {
        max-width: 600px; /* Max width for the content container */
        margin: 0 auto; /* Center the container */
        background-color: #fff; /* White background for the container */
        padding: 30px; /* Padding inside the container */
        border-radius: 10px; /* Rounded corners for the container */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    }
    
    h1 {
        text-align: center; /* Center the heading */
        color: #007bff; /* Blue color for the heading */
        margin-bottom: 25px; /* Margin below the heading */
        font-size: 2em; /* Larger font size for the heading */
    }
    
    /* Feature List Styles */
    .feature-list {
        list-style-type: none; /* Remove default list styling */
        padding: 0; /* Remove default padding */
        margin: 0; /* Remove default margin */
    }
    
    .feature-list li {
        font-size: 1.1em; /* Slightly larger font size for list items */
        padding: 10px 0; /* Padding above and below each list item */
        border-bottom: 1px solid #ddd; /* Border for list item separation */
        position: relative; /* Position for custom icons */
        padding-left: 25px; /* Padding to accommodate custom icons */
    }
    
    /* Custom Icon for Each Feature */
    .feature-list li::before {
        content: "✔️"; /* Checkmark icon for each feature */
        position: absolute; /* Position relative to the list item */
        left: 0; /* Align to the left */
        color: #28a745; /* Green color for the checkmark icon */
        font-size: 1.1em; /* Match font size with list item */
    }
    
    /* Styling for Deleted Features */
    .feature-list del {
        color: #dc3545; /* Red color for deleted text */
        text-decoration: line-through; /* Strikethrough for deleted text */
        font-weight: bold; /* Bold text for emphasis */
    }
    
    /* Responsive Design */
    @media (max-width: 600px) {
        .container {
            padding: 20px; /* Adjust padding for smaller screens */
        }
    
        .feature-list li {
            font-size: 1em; /* Adjust font size for list items */
        }
    }

Global Attributes

AttributesDescription
accesskeySpecifies a shortcut key to activate or focus an element.
autocapitalizeControls whether and how text input is automatically capitalized.
classSpecifies one or more class names for the element, allowing CSS styling and JavaScript manipulation.
contenteditableSpecifies whether the content of an element is editable or not.
contextmenuSpecifies a context menu for the element.
dirDefines the text direction. Possible values are "ltr" (left-to-right), "rtl" (right-to-left), and "auto".
draggableSpecifies whether an element is draggable. Possible values are "true" or "false".
enterkeyhintSpecifies the action label or icon to be shown for the enter key on virtual keyboards.
hiddenIndicates that the element is not yet, or is no longer, relevant. The browser does not display elements that have the `hidden` attribute set.
idSpecifies a unique identifier for the element.
inputmodeProvides a hint to browsers for which virtual keyboard configuration to use when editing this element or its descendants.
isAllows you to specify the type of custom element.
langSpecifies the language of the element's content.
nonceA cryptographic nonce ("number used once") that can be used by Content Security Policy (CSP) to determine whether or not a given fetch will be allowed to proceed.
partSpecifies the element’s part in the shadow DOM.
slotAssigns a slot in a shadow DOM shadow tree.
spellcheckIndicates whether the element is subject to spell checking.
styleProvides inline CSS styling for the element.
tabindexSpecifies the tab order of the element.
titleAdds extra information about the element, displayed as a tooltip when hovering over the element.
translateSpecifies whether the content of the element should be translated. Possible values are "yes" or "no".
HTML AttributesGlobal AttributesEvent Attributes
To view the full list
To view the full list
To view the full list
elementsChrome BrowsersMicrosoft Edge BrowserFirefox BrowsersSafari BrowserOpera Browser
<del>YesYesYesYesYes