AmitDiwan has Published 10740 Articles

HTML DOM Link hreflang Property

AmitDiwan

AmitDiwan

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

142 Views

The Link hreflang property sets/returns the language code of a linked document.SyntaxFollowing is the syntax −Returning hreflang attribute valuelinkObject.hreflangSetting hreflang to a language codelinkObject.hreflang = langCodeExampleLet us see an example for Link hreflang property − Live Demo Link hreflang Link-hreflang Spanish ... Read More

HTML DOM Link Object

AmitDiwan

AmitDiwan

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

325 Views

The HTML DOM Link Object in HTML represents the element.SyntaxFollowing is the syntax −Creating a elementvar linkObject = document.createElement(“LINK”)propertiesHere, “LinkObject” can have the following properties −PropertyDescriptioncrossOriginIt sets/returns the the CORS settings of the linked documentdisabledIt sets/returns whether the linked document is disabled, or nothrefIt sets/returns the URL of ... Read More

HTML DOM Link rel Property

AmitDiwan

AmitDiwan

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

151 Views

The HTML DOM Link rel property sets/returns the relationship between the current and the linked document and is required to mention.SyntaxFollowing is the syntax −Returning rel attribute valuelinkObject.relSetting rel to a valueStringlinkObject.rel = valueStringValue StringsHere, “valueString” can be the following −valueStringDescriptionalternateIt providesauthorIt provides a link to the author of the ... Read More

HTML DOM Link sizes Property

AmitDiwan

AmitDiwan

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

189 Views

The HTML DOM Link sizes property returns the value of the sizes attribute of link element.NOTE − The sizes property is used only when rel property is set to ‘icon’SyntaxFollowing is the syntax −Returning sizes attribute valuelinkObject.sizesExampleLet us see an example for Link rel property − Live Demo Link sizes ... Read More

HTML DOM Subscript Object

AmitDiwan

AmitDiwan

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

148 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

149 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

134 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

209 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

156 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

312 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

Advertisements