BBM Tutor
BBM Tutor

HTML5 Tag - <del> Element

Definition & Uses of HTML5 <del> Element

The HTML5 <del> tag has no difference with its prior version.

Syntax of HTML5 <del> Tag

<del>Text to be deleted</del>

What is HTML5 <del> Element ?

  • The <del> element represents a range of text that has been deleted from a document.
  • The <del> tag is one of the editing tags for tracking changes in HTML 5.
  • The HTML5 del tag contains text that is supposed to be deleted from the document. The deletion of a content represented by "striking through" a line across the text.
  • The del elements should not cross implied paragraph boundaries. ( Correct use : <del><p>....</p></del> and <p><del>...</del></p>. )
  • Editing tags <ins> and <del> are inline-level and block-level elements.
  • It must have end tag.

Where to use HTML5 <del> Tag?

  • The <del> tag is used to show that text is no longer relevant in a document without actually removing the text.
  • It is useful when authors need to show which piece of content has been deleted during an update of the document.
  • This approach of editing in HTML documents can be used to provide a standing record of the original text of articles, blog entries or other edited documents.
  • This type of markup is useful in differentiating multiple version of same document.
  • Tips & Notes

    • Use <ins> tag to insert the new content or updated content.
    • <del> tag and <s> tag are more or less similar in appearence, differences between both are very subtle. The <del> shows incorrect information that should not be in the document, where as the <s> element represents information that is no longer accurate or relevant (e.g. out of date).

    Simple HTML5 Example

    <!DOCTYPE HTML>
    <html>
    <head>
    <title> HTML5 <del> - HTML5 Tags Tutor </title>
    </head>
    <body>
    <article>
    <h3>Element-specific attribute of <param> tag </h3>
    <p> name, <del>type, </del> value, <del>valuetype </del> </p>
    </article>
    </body>
    </html>

    Output Screen

    Element-specific attribute of <param> tag

    name, type, value, valuetype

    Attributes

    • Attributes are the features added to a tag to provide the browser with more information about how the tag should appear or behave.
    • There are 3 type attributes a tag can have. They are Global Attributes, Event Attributes and Element-Specific Attributes.
    • The <del> tag is also capable of supporting the Global Attributes and Event Attributes in HTML5.

    Element-Specific Attributes

    Attributes

    Description

    Indicates url of a document that explains the reason of deletion.
    Specifies the date and time at when the text was deleted.

    Tips & Notes

    • The both cite and datetime attributes are optional attributes and has no visual effect in ordinary web browsers, but can be used by screen readers.

    cite

    • The cite attribute specifies a URL to a document that has the reason why the text was deleted.
    • The value of this attribute must be a valid URL.
    • Possible value:
    • An absolute URL ( Points a document of other website. )
    • A relative URL ( Points a document in same site. )

    datetime

    • The datetime attribute contains the date or date and time that the change was made.
    • The value of this attribute must be a valid date string with optional time.
    • The format of value is year-month-date then T then hour:minutes:seconds then time zone desingator or year-month-date.
    • If the given value is a global date and time then user agents should use the associated time-zone offset information to determine which time zone to present the given datetime in.
    • Possible values:
    • YYYY-MM-DDThh:mm:ssTZD ( eg: 2013-10-21T14:59:21Z )
    • YYYY-MM-DD ( eg: 2013-10-21 )
    • Both T and Z should be in capital letter. Z denotes Zulu, also known as Greenwich Mean Time.

    Simple HTML5 Example#2

    <!DOCTYPE HTML>
    <html>
    <head>
    <title> HTML5 <del> - HTML5 Tags Tutor </title>
    </head>
    <body>
    <article>
    <h3>Element-specific attribute of <param> tag </h3>
    <p> name, <del cite="bbminfo_html5_param.php">type,</del> value, <del datetime="2013-10-21T14:59:21Z">valuetype </del> </p>
    </article>
    </body>
    </html>

    Output Screen

    Element-specific attribute of <param> tag

    name, type, value, valuetype

    BBM Invoice
     
    Disclaimer: Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.