The HTML DOM Track kind property sets/returns the value of kind attribute of track element to specify the type of text track.Following is the syntax −Returning string valuetrackObject.kindSetting kind to stringValuetrackObject.kind = stringValueHere, “stringValue” can be the following −stringValueDetailscaptionsThe captions are translationof dialogue and sound effects (preferable for deaf users)chaptersIt defines the chaptertitles (used for navigating the media resource)descriptionsIt defines a textualdescription of the video content (preferable for blind users)metadataIt is not visible to theuser and content is used by scriptssubtitlesIt is used to displaysubtitles in a videoLet us see an example of Track kind property −Example Live Demo ... Read More
The HTML DOM Track default property sets/returns a boolean value corresponding to whether the track is to enabled until the user’s preference contradicts it.NOTE: Only one track should be default per media (audio/video) element.Following is the syntax −Returning boolean value - true/falsetrackObject.defaultSetting default to booleanValuetrackObject.default = booleanValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that track willbe default enabledfalseIt defines that track willnot be enabled unless user prefers toLet us see an example of Track default property −Example Live Demo Track default form { width:70%; margin: 0 auto; text-align: ... Read More
The HTML DOM TouchEvent Object represents an event which incurs on interaction with the HTML document elements using touch devices.Here, “TouchEvent” can have the following properties and methods −Property/MethodDescriptionaltKeyItreturns a Booleanvalue corresponding to the state if alt key was pressed when atouch event was firedchangedTouchesItreturns aTouchList object corresponding to a list of all contact pointstriggered on a state change of touch eventsctrlKeyItreturns a Booleanvalue corresponding to the state if ctrl was pressed when a touchevent was firedmetaKeyItreturns a Booleanvalue corresponding to the state if meta was pressed when a touchevent was firedshiftKeyItreturns a Booleanvalue corresponding to the state if shift ... Read More
The HTML DOM TouchEvent targetTouches property returns a TouchList object corresponding to a list of all contact points triggered on a touch surface.NOTE: If a touch is triggered on the specified node or any of its child nodes then the following touches will only count if they are also triggered on the same node.Following is the syntax −Returning TouchList objectevent.targetTouchesNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent ... Read More
The HTML DOM TouchEvent shiftKey property returns a Boolean value corresponding to the state if shift was pressed when a touch event was fired.Following is the syntax −Returning boolean value - true/falsetouchEvent.shiftKeyHere, “booleanValue” can be the following −booleanValueDetailstrueIt definesthat shift key was pressed when touch event occurredfalseIt definesthat shift key was not pressed when touch event occurredNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent shiftKey property −Example Live ... Read More
The HTML DOM TouchEvent ctrlKey property returns a Boolean value corresponding to the state if ctrl was pressed when a touch event was fired.Following is the syntax −Returning boolean value - true/falsetouchEvent.ctrlKeyHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that ctrl key waspressed when touch event occurredfalseIt defines that ctrl key wasnot pressed when touch event occurredNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent ctrlKey property −Example Live ... Read More
The HTML DOM TouchEvent altKey property returns a Boolean value corresponding to the state if alt key was pressed when a touch event was fired.Following is the syntax −Returning boolean value - true/falsetouchEvent.altKeyHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that alt key waspressed when touch event occurredfalseIt defines that alt key wasnot pressed when touch event occurredNote: We ran Touch event examples on Online HTML Editors accessed on Mobile or systems with touch access. This is done so that we can perform touch operations like touch the screen for 2 seconds.Let us see an example of TouchEvent altKey property ... Read More
The HTML DOM touchend event is triggered when touch is removed from touch screen.NOTE: This event is only for touch devices.Following is the syntax −Trigger touchend event in HTML −ontouchend = "eventFunction()"Trigger touchend event in JavaScript −eventObject.ontouchend = eventFunctionLet us see an example of touchend event property −Example Live Demo HTML DOM touchend event form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 50%; ... Read More
The HTML DOM Title Object in HTML represents the element.Creating a elementvar titleObject = document.createElement(“TITLE”)Here, “titleObject” can have the following properties −PropertyDescriptiontextItsets/returns the value of the element of thedocumentLet us see an example of Title text property −Example Live Demo HTML DOM Title text form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ... Read More
The HTML DOM Time Object in HTML represents the element.Creating a elementvar timeObject = document.createElement(“TIME”)Here, “timeObject” can have the following properties −PropertyDescriptiondateTimeItsets/returns the value of the dateTime attribute of a elementLet us see an example of Time dateTime property −Example Live Demo Time dateTime form { width:70%; margin: 0 auto; text-align: center; } * { padding: 2px; margin:5px; } input[type="button"] { border-radius: 10px; } ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP