AmitDiwan has Published 11367 Articles

HTML DOM Subscript Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

65 Views

The HTML DOM Subscript Object represent the element of an HTML document.Let us see how to create subscript objectSyntaxFollowing is the syntax −document.createElement(“SUB”);ExampleLet us see an example of HTML DOM subscript object − Live Demo    body {       text-align: center;       background-color: ... Read More

HTML DOM Link type Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

82 Views

The Link type property sets/returns the type of a linked document.SyntaxFollowing is the syntax −Returning type attribute valuelinkObject.typeSetting type to a valid valuelinkObject.type = valueNOTE  − valid values include "text/javascript", "text/css", "image/gif", etc.ExampleLet us see an example for Link type property − Link type ... Read More

HTML DOM S Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

75 Views

The HTML DOM S Object represent the element of an HTML document.Let us create an s object −SyntaxFollowing is the syntax −document.createElement(“S”);ExampleLet us see an example of s object − Live Demo    body{       text-align:center;       background-color:#fff;       color:#0197F6;   ... Read More

HTML DOM links Collection

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

133 Views

The links Collection returns a list/collection of all the links corresponding to and/or elements.SyntaxFollowing is the syntax −Returning links collectiondocument.linksPropertiesHere, “links” collection can have the following properties and methods −Property/MethodDescriptionlengthIt returns the number of  and  elementsnamedItem()It returns the  or/and  element with the specified idExampleLet us see an example ... Read More

HTML DOM Superscript Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

75 Views

The HTML DOM superscript Object represent the element of an HTML document.Let us see how to create superscript object −SyntaxFollowing is the syntax −document.createElement(“SUP”);ExampleLet us see an example of superscript object − Live Demo    body {       text-align: center;       background-color: #fff; ... Read More

HTML DOM Local Storage clear() method

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

205 Views

The HTML DOM Local Storage clear() method is used for clearing the whole local storage entries.SyntaxFollowing is the syntax −localStorage.clear()OrsessionStorage.clear()ExampleLet us see an example for LocalStorage() method property − Live Demo LocalStorage clear()    form {       width:70%;       margin: 0 auto;     ... Read More

HTML DOM Summary Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

43 Views

The HTML DOM summary Object represent the element of an HTML document.Let us now see how to create summary object −SyntaxFollowing is the syntax −document.createElement(“SUMMARY”);ExampleLet us see an example of HTML DOM summary object − Live Demo    body {       text-align: center;     ... Read More

HTML DOM Location hash Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

140 Views

The Location hash property returns/appends a string value (anchor part) to a URL. Anchor part is prefixed with ‘#’ automatically and then appended.SyntaxFollowing is the syntax −Returning value of the hash propertylocation.hashValue of the hash property setlocation.hash = ‘string’ExampleLet us see an example for Location hash property − Live Demo ... Read More

HTML DOM Table Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

557 Views

The HTML DOM table Object represent the element of an HTML document.Let us see how to create table objectSyntaxFollowing is the syntax −document.createElement(“TABLE”);PropertiesFollowing are the properties of table object −PropertyExplanationcaptionIt returns element of a table in an HTML document.tFootIt returns element of a table in an HTML ... Read More

HTML DOM Location host Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

66 Views

The Location host property returns/sets the hostname and host port (if specified). Port might not get displayed if not explicitly specified.SyntaxFollowing is the syntax −Returning value of the host propertylocation.hostValue of the host property setlocation.host = hostname:hostExampleLet us see an example for Location host property − Live Demo Location host    form ... Read More

Advertisements