Found 2417 Articles for HTML

HTML DOM removeAttributeNode() Method

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

67 Views

The HTML DOM removeAttributeNode() method removes the attribute specified in its parameter from the specified element in an HTML document and return the removed attribute as an Attr Node Object.SyntaxFollowing is the syntax −node.removeAttributeNode(attributeNode);ExampleLet us see an example of removeAttributeNode() method − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    .btn{       background:#0197F6;       border:none;       height:2rem;       border-radius:2px;   ... Read More

HTML DOM removeAttribute() Method

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

61 Views

The HTML DOM removeAttribute() method removes the attribute specified in its parameter from the specified element in an HTML document.SyntaxFollowing is the syntax −node.removeAttribute(attributeName);ExampleLet us see an example of removeAttribute() method − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    .btn{       background:#0197F6;       border:none;       height:2rem;       border-radius:2px;       width:35%;       margin:2rem auto;     ... Read More

HTML DOM scripts Collection

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

151 Views

The HTML DOM Script collection returns the collection of all elements of an HTML document.SyntaxFollowing is the syntax −document.scriptsProperty of script objectPropertyExplanationlengthIt returns the number of element in the collection in a HTML document.Methods of script objectMethodExplanation[index]It returns the specified index element from the collection.item(index)It returns the specified index element from the collection.namedItem(id)It returns the specified id element from the collection.ExampleLet us see an example of scripts collection − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: ... Read More

HTML DOM Pre Object

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

89 Views

The HTML DOM Pre Object represent the element of an HTML document.Create pre objectSyntaxFollowing is the syntax:document.createElement(“PRE”);ExampleLet us see an example of pre object − Live Demo    body{       text-align:center;       background-color:#fff;       color:#0197F6;    }    h1{       color:#23CE6B;    }    .drop-down{       width:35%;       border:2px solid #fff;       font-weight:bold;       padding:8px;    }    .btn{       background-color:#fff;       border:1.5px dashed #0197F6;       height:2rem;       border-radius:2px;       width:60%; ... Read More

HTML DOM removeChild() Method

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

89 Views

The DOM removeChild() method returns and remove the specified child node of the specified node in an HTML document.SyntaxFollowing is the syntax −node.removeChild(node);ExampleLet us see an example of removeChild() method − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    ul{       list-style-type: none;       padding:0;    }    .btn{       ... Read More

HTML DOM previousElementSibling Property

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

73 Views

The HTML DOM previousElementSibling property returns the previous element in the same tree level of the specified element in an HTML document.SyntaxFollowing is the syntax −node.previousElementSiblingExampleLet us see an example of previousElementSibling property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    .drop-down{       width:50%;       border:2px solid #fff;       ... Read More

HTML DOM previousSibling Property

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

67 Views

The DOM previousSibling property returns the previous node in the same tree level of the specified node in an HTML document.SyntaxFollowing is the syntax −node.previousSiblingExampleLet us see an example of previousSibling property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    .drop-down{       width:50%;       border:2px solid #fff;       font-weight:bold; ... Read More

HTML DOM PopStateEvent Object

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

78 Views

The HTML DOM popStateEvent object is an event handler for the popstate event which occurs when window’s history changes.Property of PopStateEventPropertyExplanationstateIt returns an object that represents a copy of the history entries.ExampleLet us see an example of HTML DOM popStateEvent Object − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    p{       font-size:1.2rem;    }    .btn{       background:#0197F6;       border:none;   ... Read More

HTML DOM parentNode Property

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

119 Views

The HTML DOM parentNode property returns the parent node object of the specified node in an HTML document.SyntaxFollowing is the syntax −node.parentNodeExampleLet us see an example of parentNode property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    .drop-down{       width:35%;       border:2px solid #fff;       font-weight:bold;       ... Read More

HTML DOM parentElement Property

AmitDiwan
Updated on 13-Jun-2020 11:23:21

81 Views

The DOM parentElement property returns the parent element of the specified element in an HTML document.SyntaxFollowing is the syntax −node.parentElementExampleLet us see an example of parentElement property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    .drop-down{       width:35%;       border:2px solid #fff;       font-weight:bold;       padding:8px;   ... Read More

Advertisements