How to delete text from document using HTML ? Last Updated : 11 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we delete text from an HTML document by using the <del> tag in the document. This tag stands for delete and is used to mark a portion of text which has been deleted from the document. Syntax: <del> Contents... </del> Example: In the following example, deletion of a text from a document is demonstrated. html <!DOCTYPE html> <html> <head> <title> How to delete text from a document using HTML? </title> <style> del { color: red; } ins { color: green; } h1 { color: green; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <b> HTML5 | How to delete text from a document </b> <p> GeeksforGeeks is a <del>mathematical</del> <ins>computer</ins> science portal </p> </body> </html> Output: Supported Browsers: Google Chrome Internet Explorer Firefox Opera Safari Comment More infoAdvertise with us Next Article How to Remove HTML element from DOM using AngularJS ? M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML HTML-Questions Similar Reads How to semantically delete text from an HTML document? To semantically delete text from an HTML document using the <del> element. This tag is used to indicate text that has been removed, providing semantic meaning and better accessibility. It visually strikes through the deleted text, helping users understand changes in the document content. Synta 1 min read How to Remove HTML element from DOM using AngularJS ? In this article, we will see how to remove particular HTML elements from the DOM with the help of AngularJS, along with understanding its implementation through the examples. For this, we can use the remove() method that helps to remove all the selected elements including all the text. Syntax: selec 2 min read HTML DOM deleteFromDocument() method The deleteFromDocument() method deletes the selected text from the document's DOM tree. Syntax: selectedText.deleteFromDocument() Parameters: No parameters Example: The example deletes the selected text by clicking a button. Upon clicking the button, the Window.getSelection() method gets the selecte 1 min read How to define a text that has been deleted from the document in HTML5 ? In this article, we will learn how to define some text that has been deleted from the document. This can be used to show a recent update in content or remove content that may be incorrect. It is usually followed by text that has been updated or corrected. We will use the <del> element to speci 2 min read How to Mark Deleted Text in HTML? In HTML, you can mark text as deleted to indicate that it has been removed from the document. This is often displayed with a strikethrough effect. There are different methods to mark deleted text in HTML, including using the <del> tag, the <s> tag, and the <strike> tag. Table of Co 2 min read HTML DOM Range deleteContents() Method The deleteContents() method deletes all the contents of the Range from the Document tree. Syntax: range.deleteContents() Parameters: This method does not accept any parameters. Return value: This method does not return any value. Example: This example describes how to delete the current range from t 1 min read Like