Copied successfully!
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
Attributes | Description |
---|---|
accesskey | Specifies a shortcut key to activate or focus an element. |
autocapitalize | Controls whether and how text input is automatically capitalized. |
class | Specifies one or more class names for the element, allowing CSS styling and JavaScript manipulation. |
contenteditable | Specifies whether the content of an element is editable or not. |
contextmenu | Specifies a context menu for the element. |
dir | Defines the text direction. Possible values are "ltr" (left-to-right), "rtl" (right-to-left), and "auto". |
draggable | Specifies whether an element is draggable. Possible values are "true" or "false". |
enterkeyhint | Specifies the action label or icon to be shown for the enter key on virtual keyboards. |
hidden | Indicates that the element is not yet, or is no longer, relevant. The browser does not display elements that have the `hidden` attribute set. |
id | Specifies a unique identifier for the element. |
inputmode | Provides a hint to browsers for which virtual keyboard configuration to use when editing this element or its descendants. |
is | Allows you to specify the type of custom element. |
lang | Specifies the language of the element's content. |
nonce | A 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. |
part | Specifies the element’s part in the shadow DOM. |
slot | Assigns a slot in a shadow DOM shadow tree. |
spellcheck | Indicates whether the element is subject to spell checking. |
style | Provides inline CSS styling for the element. |
tabindex | Specifies the tab order of the element. |
title | Adds extra information about the element, displayed as a tooltip when hovering over the element. |
translate | Specifies whether the content of the element should be translated. Possible values are "yes" or "no". |
HTML Attributes | Global Attributes | Event Attributes |
---|---|---|
To view the full list | To view the full list | To view the full list |
elements | |||||
---|---|---|---|---|---|
<del> | Yes | Yes | Yes | Yes | Yes |
Improve Our Platform
Did you find what you were looking for?
Learn how to contribute.Last updated on by our contributors.
View this page on GitHub• Report an issue with this content