- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 2417 Articles for HTML
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
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
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
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
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
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
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
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
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
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