Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML Tutorial
  • HTML Exercises
  • HTML Tags
  • HTML Attributes
  • Global Attributes
  • Event Attributes
  • HTML Interview Questions
  • HTML DOM
  • DOM Audio/Video
  • HTML 5
  • HTML Examples
  • Color Picker
  • A to Z Guide
  • HTML Formatter
Open In App
Next Article:
HTML | DOM Select remove() Method
Next article icon

HTML DOM TokenList.remove() Method

Last Updated : 12 Apr, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

The TokenList.remove() Method in HTML DOM is used to remove the particular nodes or tokens from a NodeList. It is an in-built method of TokenList Object. 

Syntax:

remove(token);  remove(token, token);  remove(token, token, token);  ...

Parameter Values: It contains a string value that represents the name of the token that you want to remove from the Token List. 

Return Value: This method does not return any value. 

Example: Below HTML code illustrates the use of the token list. remove() Method in HTML DOM. 

HTML




<!DOCTYPE html>
<html>
      
<head>
    <style>
        .geek {
            background-color: green;
            font-size: 50px;
        }
    </style>
</head>
  
<body>
    <center>
        <h2 id="gfg" class="geek">
            GeeksforGeeks
        </h2>
        <h2>
            HTML DOM TokenList remove() Method
        </h2>
        <button onclick="myGeek()"> Submit </button>
    </center>
  
    <script>
        function myGeek() {
            var elem = document.getElementById("gfg");
  
            // removing class from div element
            elem.classList.remove("geek");
        }
    </script>
</body>
  
</html>
 
 

Output: 

TokenList.remove() Method in HTML DOM



Next Article
HTML | DOM Select remove() Method

M

manaschhabra2
Improve
Article Tags :
  • HTML
  • Web Technologies
  • HTML-DOM
  • HTML-Methods

Similar Reads

  • HTML DOM TokenList.replace() Method
    The replace() method in HTML DOM is used to replace or change an old token with a new one in a DOM TokenList Object. Syntax: domtokenlist.replace(old, new) Parameter Values: It contains two values: old: It is a required parameter, that specifies the name of the token that would be replaced. new: It
    1 min read
  • HTML | DOM Select remove() Method
    The Select remove() method in HTML DOM is used to remove an option from a drop-down list. This method accepts the index number as a parameter to removing the option from the desired position. Syntax: selectObject.remove(index) Parameters: It contains single parameter index which is mandatory and use
    2 min read
  • HTML DOM TokenList supports() Method
    The supports() method in HTML DOM is used to check if a specific token is supported in a DOM TokenList. Syntax: domtokenlist.supports(token)Parameter values: It contains a single value token that specifies the name of the token which is to be checked. Return value: It returns a boolean value that re
    1 min read
  • HTML DOM removeAttribute() Method
    The DOM removeAttribute() method is used to remove an attribute with specified name from the element. It is similar to the removeAttributeNode() method but the difference is that the removeAttributeNode method is used to remove the specified attribute object, but on the other hand, removeAttribute r
    1 min read
  • HTML DOM removeNamedItem() Method
    The removeNamedItem() method in HTML is used to remove the node with the specified name in a namednode object. Syntax: namednode.removeNamedItem( nodename )Parameter: The removeNamedItem() contains only one parameter nodename that is described below. nodename: This method accepts a single parameter
    2 min read
  • HTML DOM removeChild() Method
    The HTML DOM removeChild() method is used to remove a specified child node of the given element. It returns the removed node as a node object or null if the node doesn't exist. Syntax: node.removeChild(child) Parameters: This method accepts a single parameter child which is mandatory. It represents
    2 min read
  • HTML DOM removeAttributeNode() Method
    The DOM removeAttributeNode() method is used to remove the specified attribute from the current element. It is similar to removeAttribute() method but the difference is that the removeAttribute method is used to remove the attribute with the specified name, but on the other hand removeAttributeNode
    1 min read
  • HTML DOM replaceWith() Method
    The replaceWith() method replaces the node in the children list of its parent with a set of Node or DOMString objects. DOMString objects are equivalent to Text nodes. Here, the One Child element is replaced by the Other Child element. Syntax: ChildNode.replaceWith(Node); Parameters: ChildNode: The C
    1 min read
  • HTML DOM Form reset() Method
    The reset() method in the HTML DOM is used to reset a form fields to their default values. When a form is reset, all user input is cleared, and the fields revert to their initial states. SyntaxformObject.reset()Example: In this example, clicking the reset button clears the form inputs. [GFGTABS] htm
    1 min read
  • p5.Table removeTokens() Method
    The removeTokens() method of p5.Table in p5.js is used to remove all the specified characters from values in the table. A specific column can be specified for removing the token from only that column. However, if no column is specified then the values of all the columns and rows in the table are pro
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences