HTML Articles

Page 25 of 151

HTML DOM MouseEvent clientX Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 202 Views

The HTML DOM MouseEvent clientX property returns the horizontal coordinate (x-axis position) of the mouse pointer relative to the visible area of the web browser when a mouse event occurs. The coordinate is measured in pixels from the left edge of the browser's client area, excluding scrollbars, toolbars, and other browser interface elements. Syntax Following is the syntax for accessing the clientX property − MouseEventObject.clientX Return Value The clientX property returns a number representing the horizontal pixel coordinate of the mouse pointer. The value is always relative to the current viewport, not the ...

Read More

HTML DOM MouseEvent offsetX Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 682 Views

The HTML DOM MouseEvent offsetX property returns the horizontal (x) coordinate of the mouse pointer relative to the target element when a mouse event is triggered. It represents the distance in pixels from the left edge of the element to the mouse cursor position. Syntax Following is the syntax for accessing the offsetX property − MouseEventObject.offsetX Return Value The offsetX property returns a number representing the horizontal coordinate of the mouse pointer relative to the target element's left edge, measured in pixels. How It Works The offsetX property calculates the mouse ...

Read More

HTML DOM MouseEvent relatedTarget

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 150 Views

The HTML DOM MouseEvent relatedTarget property returns the element that the mouse was previously on or is moving to during mouse events. It is primarily used with mouseover and mouseout events to determine which element triggered the event transition. When a mouseover event occurs, relatedTarget refers to the element the mouse came from. When a mouseout event occurs, relatedTarget refers to the element the mouse is moving to. Syntax Following is the syntax to access the relatedTarget property − MouseEventObject.relatedTarget Return Value The relatedTarget property returns an Element object representing the related ...

Read More

HTML DOM Ol reversed Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 206 Views

The HTML DOM Ol reversed property sets or returns whether an ordered list should display its numbering in descending order (from highest to lowest) instead of the default ascending order (from lowest to highest). Syntax Following is the syntax for returning the reversed property − olObject.reversed Following is the syntax for setting the reversed property − olObject.reversed = booleanValue Parameters The booleanValue parameter can be one of the following − Value Description true Sets the list numbering in descending order (highest ...

Read More

HTML DOM Ol type Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 183 Views

The HTML DOM Ol type property sets or returns the value of the type attribute of an ordered list () element. This property determines the type of marker (numbering style) used for list items in an ordered list. Syntax Following is the syntax for returning the type property − olObject.type Following is the syntax for setting the type property − olObject.type = "1|a|A|i|I" Property Values The type property accepts the following values − Value Description Example "1" Default decimal numbers 1, ...

Read More

HTML DOM Time Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 231 Views

The HTML DOM Time Object represents the element in the Document Object Model. This object provides properties and methods to interact with HTML time elements, allowing developers to access and manipulate datetime information programmatically. The element is used to represent a specific period in time, such as dates, times, or durations. It provides semantic meaning to temporal content and can be styled with CSS or manipulated with JavaScript. Syntax To create a Time object using JavaScript − var timeObject = document.createElement("TIME"); To access an existing time element − var ...

Read More

HTML DOM timeStamp Event Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 299 Views

The HTML DOM timeStamp property returns the elapsed time in milliseconds since the document was loaded when an event was created or triggered. This property is particularly useful for measuring performance, timing user interactions, and creating time-based game mechanics. The timeStamp property only works if the event system supports it for the particular event type. Most modern browsers support this property for common events like mouse events, keyboard events, and touch events. Syntax Following is the syntax for accessing the timeStamp property − event.timeStamp This returns a number representing the time in milliseconds ...

Read More

HTML DOM TouchEvent ctrlKey Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 110 Views

The HTML DOM TouchEvent ctrlKey property returns a boolean value that indicates whether the Ctrl key was pressed when a touch event was triggered. This property is useful for creating touch interfaces that respond differently based on modifier key combinations. Syntax Following is the syntax for accessing the ctrlKey property − touchEvent.ctrlKey Return Value The property returns a boolean value indicating the state of the Ctrl key − Return Value Description true The Ctrl key was pressed when the touch event occurred false ...

Read More

HTML DOM TouchEvent Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 233 Views

The HTML DOM TouchEvent Object represents events that occur when users interact with HTML document elements using touch-enabled devices like smartphones, tablets, or touch screens. Touch events are essential for creating responsive mobile web applications. TouchEvent Properties The TouchEvent object provides several properties to detect modifier key states and touch point information − Property Description altKey Returns a Boolean value indicating if the Alt key was pressed when the touch event was fired. changedTouches Returns a TouchList object containing all contact points that triggered a state change in ...

Read More

HTML DOM Track default Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 153 Views

The HTML DOM Track default property sets or returns a boolean value that determines whether a text track should be enabled by default when the media element loads, unless the user's preferences override this setting. Note: Only one track element should have the default attribute set to true per media (audio/video) element to avoid conflicts. Syntax Following is the syntax for returning the default property value − trackObject.default Following is the syntax for setting the default property − trackObject.default = booleanValue Parameters The booleanValue parameter can have the ...

Read More
Showing 241–250 of 1,509 articles
« Prev 1 23 24 25 26 27 151 Next »
Advertisements