- 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 2416 Articles for HTML
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
134 Views
The HTML DOM Video buffered property returns a TimeRanges object containing information about the video’s buffered range length and its start, end position.SyntaxFollowing is the syntax −Returning TimeRanges ObjectmediaObject.bufferedLet us see an example of Video buffered property −Example Live Demo HTML DOM Video buffered * { padding: 2px; margin:5px; } form { width:70%; margin: 0 auto; text-align: center; } input[type="button"] { border-radius: 10px; } ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
133 Views
The HTML DOM Video autoplay property returns/sets boolean value corresponding to whether the video will play automatically on page load or not.SyntaxFollowing is the syntax −Returning boolean value - true/falsemediaObject.autoplaySetting autoplay to booleanValuemediaObject.autoplay = booleanValueHere, “boolean value” can be the following −booleanValueDetailstrueIt defines that video will automatically play onpage loadfalseIt defines that video will not automatically playon page loadLet us see an example of Video autoplay property −Example Live Demo HTML DOM Video autoplay * { padding: 2px; margin:5px; } form { width:70%; ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
171 Views
The HTML DOM value property returns a string corresponding to the value of the attribute of an element.Following is the syntax −Returning string valueelementAttribute.valueLet us see an example of HTML DOM value property −Example Live Demo HTML DOM value * { padding: 2px; margin:5px; } form { width:70%; margin: 0 auto; text-align: center; } input[type="button"] { border-radius: 10px; } HTML-DOM-value What is src attribute's value? var divDisplay = document.getElementById("divDisplay"); function getAnswers() { var ans = document.getElementsByTagName('img')[0].attributes[0].value; divDisplay.textContent = 'src attribute has a value '+ans; } OutputBefore clicking ‘Get Answer’ button −After clicking ‘Get Answer’ button −
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
65 Views
The HTML DOM URL property returns a string corresponding to the url of the document.Following is the syntax −Returning string valuedocument.URLLet us see an example of HTML DOM URL property −Example Live Demo HTML DOM URL form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } HTML-DOM-URL This is a Demo Example var divDisplay = document.getElementById("divDisplay"); function getLink() { divDisplay.textContent = document.URL; } OutputBefore clicking ‘Get Link’ button −After clicking ‘Get Link’ button −
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
132 Views
The HTML DOM Underline Object in HTML represents the element.Creating a elementvar uObject = document.createElement(“U”)Let us see an example of Underline element −Example Live Demo HTML DOM Underline form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } HTML-DOM-Underline Warning: This is a Demo Example var uObject = document.getElementById("Underline"); function getBetterDisp() { uObject.style.backgroundColor = '#DC3545'; uObject.style.color = '#FFF'; } OutputBefore clicking show button −After clicking show button −
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
81 Views
The HTML DOM Ul Object in HTML represents the element.Creating a elementvar ulObject = document.createElement(“UL”)Here, “ulObject” can have the following properties but are not supported in HTML5 −PropertyDescriptioncompactItsets/returns whether the unordered list should be displayedsmaller than usualtypeItsets/returns the value of the type attribute of an unordered listLet us see an example of unordered list element −Example Live Demo Ul item() form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
24 Views
The HTML DOM UiEvent Object represents an event which incurs on user’s interaction with HTML elements.Here, “UiEvent” can have the following properties and methods −Property/MethodDescriptiondetailItreturns a number with details about the eventviewItreturns a reference to the Window object where the event occurredLet us see an example of Event detail property −Example Live Demo HTML DOM UiEvent detail form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
27 Views
The HTML DOM UiEvent detail property returns a number corresponding to clicks triggered continuously.NOTE − If ondblclick event is triggered returned value is ‘2’, and always ‘0’ if onmouseover or onmouseout event is triggered.SyntaxFollowing is the syntax −Returning number of clicks triggered continuously −event.detailLet us see an example of Event detail property −Example Live Demo HTML DOM UiEvent detail form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
75 Views
The HTML DOM Event type property returns a string corresponding to the event’s type such as click, keypress, load, or touchend.Following is the syntax −Returning number of seconds a transition has run −event.typeLet us see an example of Event type property −Example Live Demo HTML DOM Event type form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } .playArea { ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
37 Views
The HTML DOM TransitionEvent Object represents an event which incurs on a transition.Here, “TransitionEvent” can have the following properties and methods −Property/MethodDescriptionpropertyNameItreturns returns astring corresponding to a CSS property used for transition when atransition event is triggeredelapsedTimeItreturns a numbercorresponding to how many seconds a transition had run when atransition event is triggeredpseudoElementItreturns a nameof the pseudo-element of the transitionLet us see an example of TransitionEvent elapsedTime property −Example Live Demo TransitionEvent elapsedTime form { width:70%; margin: 0 auto; text-align: center; } * { ... Read More