JQuery | parseHTML() method Last Updated : 27 Apr, 2020 Comments Improve Suggest changes Like Article Like Report This parseHTML() Method in jQuery is used to parses a string into an array of DOM nodes. Syntax: jQuery.parseHTML(data [, context ] [, keepScripts ]) Parameters: The parseXML() method accepts three parameter that is mentioned above and described below: data: This parameter is the HTML string to be parsed. context : This parameter is the document element to serve as the context in which the HTML fragment will be created. keepScripts : This parameter is the boolean indicating whether to include scripts passed in the HTML string. Return Value: It returns the Array. Example 1: In this example, the parseHTML() Method a string is parsed into an array of DOM nodes. html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JQuery | parseHTML() method</title> <script src="https://code.jquery.com/jquery-3.4.1.js"></script> </head> <body style="text-align:center;"> <h1 style="color: green"> GeeksForGeeks </h1> <h3>JQuery | parseHTML() method</h3> <pre id="geek"> </pre> <script> var $geek = $( "#geek" ), str = "A <b>computer science portal</b> for <b>geeks</b>", html = jQuery.parseHTML( str ), nodeNames = []; $geek.append( html ); </script> </body> </html> Output: Example 2: In this example, the parseHTML() Method create an array of DOM nodes using an HTML string and insert it into a div. html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>JQuery | parseHTML() method</title> <script src="https://code.jquery.com/jquery-3.4.1.js"></script> </head> <body style="text-align:center;"> <h1 style="color: green"> GeeksForGeeks </h1> <h3>JQuery | parseHTML() method</h3> <div id="geek"> </div> <script> var $geek = $( "#geek" ), str = "A <b>computer science portal</b> for <b>geeks</b>", html = jQuery.parseHTML( str ), nodeNames = []; $geek.append( html ); $.each( html, function( i, el ) { nodeNames[ i ] = "<li>" + el.nodeName + "</li>"; }); $geek.append( "<h3>Node Names:</h3>" ); $( "<b></b>" ) .append( nodeNames.join( "" ) ) .appendTo( $geek ); </script> </body> </html> Output: Comment More infoAdvertise with us Next Article JQuery | parseHTML() method S SHUBHAMSINGH10 Follow Improve Article Tags : Web Technologies JQuery jQuery-Methods Similar Reads JQuery | parseXML() Method This parseXML() Method in jQuery is used to parse a string into an XML document. Syntax: jQuery.parseXML( data ) Parameters: This method accept single parameter which is mentioned above and described below: data: This parameter holds the well-formed XML string to be parsedd. Return Value: It returns 2 min read jQuery param() method The param() method in jQuery is used to create a serialized representation of an object. Syntax: $.param( object, trad )Parameters: This method accepts two parameters as mentioned above and described below: object: It is a mandatory parameter that is used to specify an array or object to serialize.t 2 min read JQuery | parseJSON() method This parseJSON() method in jQuery takes a well-formed JSON string and returns the resulting JavaScript value. Syntax: jQuery.parseJSON( json )Parameters: The parseXML() method accepts only one parameter that is mentioned above and described below: json: This parameter is the well-formed JSON string 2 min read jQuery remove() Method The remove() method in JQuery is used to remove all the selected elements including all the text. This method also remove data and all the events of the selected elements. Syntax: $(selector).remove()Return Value: It will return all the data of the selected elements deleted. Example 1: Input: $("p") 2 min read jQuery text() Method This method is used to set or return the text content of the element. While setting the content, it overwrites the content of all the matched elements. The returned content of text method() is used to return the text content of all matched elements. Syntax: Return text syntax: $(selector).text() Set 2 min read JQuery | type() method This type() Method in jQuery is used to determine the internal JavaScript [[Class]] of an object. Syntax: jQuery.type( obj ) Parameters: The type() method accepts only one parameter that is mentioned above and described below: obj: This parameter is the object to get the internal JavaScript [[Class] 2 min read jQuery | Misc param() Method The param() method in jQuery is used to create a representation of an array or an object. This representation is created in a serialized way. This serialized values can be used in making an ajax request in URL. Syntax: $.param(object, trad) Parameter: object: Specifies an array or object to serializ 1 min read JQuery sub() Method This sub() method in JQuery is used to display the string as subscript text. This method returns the string embedded in the tag, like this: <sub> string </sub>.Syntax:Â string.sub()Parameters: This method does not accept any parameter.There are two examples discussed below:Example 1: In t 1 min read jQuery | Misc get() Method The get() Method in jQuery is used to get the DOM element specified by the selectors. Syntax $(selector).get(index) Parameters: This method accepts single parameter index which is optional. It is used to specify which of the matching elements to get by its index number. Example 1: This example uses 1 min read What is the use of param() method in jQuery ? In this article, we will learn about the param() method which is an inbuilt method provided by jQuery. This method is used for creating a serialized representation of an object. The method will recursively serialize deep objects for trying to work with modern languages like Ruby on Rails or Python. 3 min read Like