Found 2417 Articles for HTML

HTML DOM scrollWidth Property

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

98 Views

The DOM scrollWidth property returns the entire width (content + padding) of an element in pixels in an HTML document.SyntaxFollowing is the syntax −element.scrollWidthExampleLet us see an example of scrollWidth property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: #ff7f5094;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;       height:80px;       border:1px solid #fff;       overflow:auto;       width:250px;       margin:20px auto;    } ... Read More

HTML DOM scrollHeight Property

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

143 Views

The HTML DOM scrollHeight property returns the entire height (content + padding) of an element in px in an HTML document.SyntaxFollowing is the syntax −element.scrollHeightExampleLet us see an example of scrollHeight property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: #ff7f5094;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;       height:80px;       border:1px solid #fff;       overflow:auto;       width:250px;       margin:20px auto;   ... Read More

HTML DOM replaceChild() Method

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

78 Views

The DOM replaceChild() method replace a child node with a new one in an HTML document.SyntaxFollowing is the syntax −node.replaceChild(newNode, oldNode);ExampleLet us see an example of replaceChild() method − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: #ff7f5094;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    ul{       list-style-type:none;       padding:0;    }    .btn{       background:#0197F6;       border:none;       height:2rem; ... Read More

HTML DOM ownerDocument Property

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

79 Views

The HTML DOM ownerDocument property returns a Document object which represents the owner document of a node.SyntaxFollowing is the syntax −node.ownerDocumentExampleLet us see an example of ownerDocument property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: #ff7f5094;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    .btn{       background:#0197F6;       border:none;       height:2rem;       border-radius:2px;       width:35%;       margin:2rem ... Read More

HTML DOM removeEventListener() Method

AmitDiwan
Updated on 13-Jun-2020 11:43:03

59 Views

The DOM removeEventListener() method removes an event handler from an HTML element in an HTML document.SyntaxFollowing is the syntax −document.open(event, function, useCapture);Here, event represent the event name, function specifies the function to remove and useCapture takes either true or false value.Where true represent removes event handler from capturing phase and false represent removes event handler from bubbling phase.ExampleLet us see an example of removeEventListener() method − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: linear-gradient(62deg, #FBAB7E 0%, #F7CE68 100%) center/cover no-repeat;   ... Read More

HTML DOM open() Method

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

89 Views

The DOM open() method set a node specified in its parameter to an attribute node using its name in an HTML document.SyntaxFollowing is the syntax −document.open(type, replace);Here type represent type of document and replace represent whether the history entry for the new document inherits the history entry from the document which opened this document or not.ExampleLet us see an example of open() method − Live Demo    body{       text-align:center;       color:#fff;       background: #ff7f5094;    }    .btn{       background:#0197F6;       border:none;       height:2rem;   ... Read More

HTML DOM readyState Property

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

93 Views

The DOM readyState property returns the loading status of the current HTML document.SyntaxFollowing is the syntax −document.readyStateExampleLet us see an example of readyState property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       background: #ff7f5094;       height:100%;    }    p{       font-weight:700;       font-size:1.2rem;    }    .btn{       background:#0197F6;       border:none;       height:2rem;       border-radius:2px;       width:35%;       margin:2rem auto;       ... Read More

HTML DOM removeNamedItem() Method

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

66 Views

The HTML DOM removeNamedItem() method removes the node specified in its parameter from an attribute node using its name in an HTML document.SyntaxFollowing is the syntax −node.removeNamedItem(node);ExampleLet us see an example of removeNamedItem() 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:60%;       margin:2rem ... Read More

HTML DOM setNamedItem() Method

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

90 Views

The DOM setNamedItem() method set a node specified in its parameter to an attribute node using its name in an HTML document.SyntaxFollowing is the syntax −node.setNamedItem(node);ExampleLet us see an example of setNamedItem() 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:50%;       margin:2rem auto; ... Read More

HTML DOM setAttributeNode() Method

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

79 Views

The DOM setAttributeNode() method set an attribute specified in its parameter to a specified element in an HTML document and return the value as an Attr Node Object.SyntaxFollowing is the syntax −node.setAttributeNode(attributeNode);ExampleLet us see an example of setAttributeNode() 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

Advertisements