- 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
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
255 Views
The HTML Object represents the element of an HTML document.Let us see how to access HTML object −SyntaxFollowing is the syntax −document.getElementsByTagName(“HTML”)Let us see an example of HTML object −Example Live Demo body{ text-align:center; } .btn{ background-color:lightblue; border:none; height:2rem; border-radius:50px; width:60%; margin:1rem auto; } .show{ font-size:1rem; font-weight:bold; color:orange; border:2px solid green; padding:10px; display:none; } ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
77 Views
The HTML DOM History length property returns of URLs in the History list of current window.SyntaxFollowing is the syntax −history.lengthExampleLet us see an example of HTML DOM History length property − Live Demo body{ text-align:center; } .btn{ background-color:lightblue; border:none; height:2rem; border-radius:50px; width:60%; margin:1rem auto; } .show{ font-size:2rem; font-weight:bold; color:orange; } History length Property Example Click me to get History length function getHistoryLength(){ var historyLength=history.length; document.querySelector(".show").innerHTML = historyLength; } OutputThis will produce the following output −Click on the “blue” button to see the history length of current browser window.
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
88 Views
The HTML DOM Input Checkbox autofocus property returns and modify the value of autofocus attribute of an input HTML element with type=”checkbox”.SyntaxFollowing is the syntax −1. Returning autofocusobject.autofocus2. Modifying autofocusobject.autofocus = true|falseExampleLet us see an example of autofocus property − Live Demo
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
297 Views
The HTML DOM input checkbox defaultChecked property returns the default value of checked attribute of a checkbox in HTML.SyntaxFollowing is the syntax −object.defaultCheckedExampleLet us see an example of defaultChecked property − Live Demo HTML DOM checked property body{ text-align:center; } p{ font-size:1.5rem; color:#ff8741; } input{ width:30px; height:30px; } button{ background-color:#db133a; color:#fff; padding:8px; border:none; width:180px; margin:0.5rem; ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
235 Views
The HTML DOM input checkbox checked property returns and alter the value of checked attribute of a checkbox in HTML.syntaxFollowing is the syntax −1. Returning checkedobject.checked2. Altering checkedobject.checked = true|falseExampleLet us see an example of HTML DOM Input Checkbox checked property − Live Demo HTML DOM checked property body{ text-align:center; } p{ font-size:1.5rem; color:#ff8741; } input{ width:30px; height:30px; } button{ background-color:#db133a; color:#fff; padding:8px; border:none; ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
152 Views
The HTML DOM Input Button Object serves as an input HTML element with type attribute as “button”.Let us see how to create an Input Button Object −syntaxFollowing is the syntax −var newButton = document.createElement(“INPUT”); newButton.setAttribute(“type”, ”value”);Here, value can be “button”, “submit” & “reset”.propertiesFollowing are the properties of Input Button Object −PropertyExplanationautofocusThis property returns and alter the value of autofocus attribute of an input button in HTML.defaultValueIt returns and modify the default value of an input button in HTML.disabledIt returns and alter the value of disabled attribute of an input button in HTML.formIt returns the reference of the form which enclose ... Read More
![Sharon Christine](https://www.tutorialspoint.com/assets/profiles/13517/profile/60_82215-1512649681.jpg)
75 Views
The HTML DOM input button disabled property returns and alter the value of disabled attribute of an input button in HTML.SyntaxFollowing is the syntax −1. Returning nameobject.disabled2. Modifying nameobject.disabled = true|falseExampleLet us see an example of disabled property − Live Demo HTML DOM disabled Property body{ text-align:center; } .btn{ display:block; margin:1rem auto; background-color:#db133a; color:#fff; border:1px solid #db133a; padding:0.5rem; border-radius:50px; width:80%; } .show-message{ font-weight:bold; ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
85 Views
The HTML DOM name property returns and alter the value of name attribute of an input button in HTML.SyntaxFollowing is the syntax −1. Returning nameobject.name2. Modifying nameobject.name=”text”Here, “text” represents the new name of the input button.ExampleLet us see an example of name property − Live Demo HTML DOM name Property body{ text-align:center; } .btn{ display:block; margin:1rem auto; background-color:#db133a; color:#fff; border:1px solid #db133a; padding:0.5rem; border-radius:50px; width:80%; } ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
98 Views
The HTML DOM value property returns and modify the content of the value attribute of input button.SyntaxFollowing is the syntax −1. Returning valueobject.value2. Modifying valueobject.value=”text”ExampleLet us see an example of value property Live Demo HTML DOM value Property body{ text-align:center } .btn{ display:block; margin:1rem auto; background-color:#db133a; color:#fff; border:1px solid #db133a; padding:0.5rem; border-radius:50px; width:80%; } .show-value{ font-weight:bold; font-size:1.4rem; ... Read More