Found 2416 Articles for HTML

HTML DOM TransitionEvent propertyName Property

AmitDiwan
Updated on 30-Oct-2019 06:00:35

40 Views

The HTML DOM TransitionEvent propertyName property returns a string corresponding to a CSS property used for transition when a transition event is triggered.Following is the syntax −Returning CSS property that transition has used −transitionEvent.propertyNameLet us see an example of TransitionEvent propertyName property −Example Live Demo TransitionEvent propertyName    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    #playArea {       display: ... Read More

HTML DOM TransitionEvent elapsedTime Property

AmitDiwan
Updated on 30-Oct-2019 05:57:29

23 Views

The HTML DOM TransitionEvent elapsedTime property returns a number corresponding to how many seconds a transition had run when a transition event is triggered.Following is the syntax −Returning number of seconds a transition has run −transitionEvent.elapsedTimeLet us see an example of TransitionEvent elapsedTime property −Example Live Demo TransitionEvent elapsedTime    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    #playArea {     ... Read More

HTML DOM Track srclang Property

AmitDiwan
Updated on 18-Feb-2021 05:11:49

55 Views

The HTML DOM Track srclang property sets/returns a value corresponding to the language of text track.Following is the syntax −Returning string valuetrackObject.srclangSetting srclang to stringValuetrackObject.srclang = stringValueLet us see an example of Track srclang property −ExampleLive Demo Track srclang    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    Track-srclang                                                                          var divDisplay = document.getElementById("divDisplay");    var trackSelect = document.getElementsByTagName("track");    function getTrackDetails() {       for(var i=0; i

HTML DOM Track src Property

AmitDiwan
Updated on 18-Feb-2021 05:13:19

76 Views

The HTML DOM Track src property sets/returns the value of src attribute of track element to specify the URL for track.Following is the syntax −Returning string valuetrackObject.srcSetting src to stringValuetrackObject.src = URLLet us see an example of Track src property −ExampleLive Demo Track src    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    Track-src                                                                              var divDisplay = document.getElementById("divDisplay");    var trackSelect = document.getElementsByTagName("track");    function getTrackDetails() {       for(var i=0; i

HTML DOM Track Object

AmitDiwan
Updated on 18-Feb-2021 05:13:58

120 Views

The HTML DOM Track Object in HTML represents the element.Creating a elementvar trackObject = document.createElement(“TRACK”)Here, “trackObject” can have the following properties −PropertyDescriptiondefaultItsets/returns the default state of a trackkindItsets/returns the value of the kind attribute of the tracklabelItsets/returns the value of the label attribute of the trackreadyStateItreturns the current state of the track resourcesrcItsets/returns the value of the src attribute of the tracksrclangItsets/returns the value of the srclang attribute of the tracktrackItreturns a TextTrack object representing the track element's texttrack dataLet us see an example of Track kind property −Example Live Demo Track kind    form {   ... Read More

HTML DOM Track label Property

AmitDiwan
Updated on 21-Dec-2021 09:52:28

76 Views

The HTML DOM Track label property sets/returns the value of label attribute of track element to specify the visible text for track.Following is the syntax −Returning string valuetrackObject.labelSetting label to stringValuetrackObject.label = labelValueLet us see an example of Track label property −Example Track label    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    Track-label                                                                              var divDisplay = document.getElementById("divDisplay");    var trackSelect = document.getElementsByTagName("track");    function getTrackDetails() {       for(var i=0; i

HTML DOM Track kind Property

AmitDiwan
Updated on 29-Oct-2019 11:01:10

64 Views

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

HTML DOM Track default Property

AmitDiwan
Updated on 29-Oct-2019 10:56:18

67 Views

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

HTML DOM touchstart Event

AmitDiwan
Updated on 08-Jul-2020 05:18:07

358 Views

The HTML DOM touchstart event is triggered when touch screen is touched.NOTE − This event is only for touch devices.Following is the syntax −Trigger touchstart event in HTML −ontouchstart = "eventFunction()"Trigger touchstart event in JavaScript −eventObject.ontouchstart = eventFunctionNote − 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 touchstart event property −Example Live Demo HTML DOM touchstart event    form {       width:70%;       margin: 0 ... Read More

HTML DOM touchmove Event

AmitDiwan
Updated on 08-Jul-2020 05:18:48

323 Views

The HTML DOM touchmove event is triggered when touch is moved across the touch screen.NOTE − This event is only for touch devices.Following is the syntax −Trigger touchmove event in HTML −ontouchmove = "eventFunction()"Trigger touchmove event in JavaScript −eventObject.ontouchmove = eventFunctionNote − 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 touchmove event property −Example Live Demo HTML DOM touchmove event    * {       padding: 2px; ... Read More

Advertisements