HTML DOM Script type Property Last Updated : 21 Jun, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The DOM Script type Property is used to set or return the value of the type attribute of a <script> element. The type attribute is used to specify the MIME type of a script. and identify the content of the <script> Tag. It has a Default value which is "text/javascript". Syntax: It is used to Return the type property:scriptObject.type It is used to set the type property:scriptObject.type = MIME_type Property Values: It contains the value i.e. MIME type which specifies the MIME type of a script. Common Values: text/javascript (this is default)text/ecmascriptapplication/ecmascriptapplication/javascript Return Values: It returns a string value that represents the MIME type of a script. Example 1: This Example illustrates to return the Type Property. HTML <!DOCTYPE html> <html> <head> <title> DOM script type Property </title> </head> <body style="text-align:center;"> <h1> GeeksForGeeks </h1> <h2> DOM script type property </h2> <script id="myGeeks" type="text/javascript"> document.write("Hello GeeksForGeeks"); </script> <br> <br> <button onclick="Geeks()"> Submit </button> <h2 id="demo"></h2> <script> function Geeks() { let x = document.getElementById("myGeeks").type; document.getElementById("demo") .innerHTML = x; } </script> </body> </html> Output: Example 2: This Example illustrates to set the Type Property. HTML <!DOCTYPE html> <html> <head> <title> DOM script type Property </title> </head> <body style="text-align:center;"> <h1> GeeksForGeeks </h1> <h2> DOM script type property </h2> <script id="myGeeks" type="text/javascript"> document.write("Hello GeeksForGeeks"); </script> <br> <br> <button onclick="Geeks()"> Submit </button> <h2 id="demo"></h2> <script> function Geeks() { let x = document.getElementById("myGeeks").type = "MIME_type "; document.getElementById("demo").innerHTML = x; } </script> </body> </html> Output: Supported Browsers: The browsers supported by DOM script type property are listed below: Google ChromeInternet ExplorerFirefoxApple SafariOpera Comment More infoAdvertise with us Next Article HTML DOM Script src Property M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM Similar Reads HTML DOM Script text Property The HTML DOM Script text Property is used to set or return the content of the <script> element. Syntax: It Returns the text property:scriptObject.textIt is used to set the text property:scriptObject.text = contents Property Values: It contains the value i.e contents that specify the content of 2 min read HTML DOM Script text Property The HTML DOM Script text Property is used to set or return the content of the <script> element. Syntax: It Returns the text property:scriptObject.textIt is used to set the text property:scriptObject.text = contents Property Values: It contains the value i.e contents that specify the content of 2 min read HTML | DOM Select type Property The Select type property is used for returning the type of form element a drop-down list is. A drop-down list can be of two types, which are "select-one" or "select-multiple".Syntax: selectObject.type Return Value: A String, representing the type of form element the drop-down list (<select> el 1 min read HTML DOM Script src Property The DOM Script src Property is used to set or return the value of the src attribute of an <script> element. The src attribute specifies the URL of the External Javascript file. Syntax: It returns the src property:scriptObject.srcIt is used to set the src property:scriptObject.src = URL Propert 1 min read HTML DOM Script src Property The DOM Script src Property is used to set or return the value of the src attribute of an <script> element. The src attribute specifies the URL of the External Javascript file. Syntax: It returns the src property:scriptObject.srcIt is used to set the src property:scriptObject.src = URL Propert 1 min read HTML DOM Source type Property The Source type Property in HTML DOM is used to set or return the value of the type attribute in a <source> element. The type attribute is used to specify the MIME type of the media resource. Syntax: It returns the Source type property. sourceObject.typeIt is used to set the Source type proper 2 min read Like