AmitDiwan

AmitDiwan

8,392 Articles Published

Articles by AmitDiwan

Page 254 of 840

HTML oncopy Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 207 Views

The HTML oncopy attribute is an event handler that triggers when a user copies the content of an HTML element. This attribute can be applied to any HTML element to execute JavaScript code whenever the copy action occurs, whether through keyboard shortcuts (Ctrl+C), right-click context menu, or browser menu options. Syntax Following is the syntax for the oncopy attribute − Content Where script is the JavaScript code to execute when the copy event is triggered. Parameters The oncopy attribute accepts a single parameter − script − JavaScript code or function ...

Read More

HTML5 Semantics

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 1K+ Views

HTML5 Semantics refers to semantic elements that provide meaningful structure and context to web content. Unlike generic and elements, semantic tags clearly describe their purpose and content to browsers, search engines, and assistive technologies. Semantic elements improve accessibility, SEO optimization, and code maintainability by making HTML documents more structured and meaningful. They help screen readers navigate content better and allow search engines to understand page structure more effectively. Benefits of HTML5 Semantic Elements Better SEO − Search engines can better understand and index your content structure. Improved Accessibility − Screen readers can navigate and ...

Read More

HTML DOM Video defaultMuted Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 225 Views

The HTML DOM Video defaultMuted property sets or returns a boolean value that indicates whether the video's audio should be muted by default when the page loads. This property reflects the state of the HTML muted attribute and determines the initial mute state of the video element. Note − This property only affects the default state when the video loads. It does not dynamically mute or unmute the video during playback. To control muting during playback, use the muted property instead. Syntax Following is the syntax for getting the defaultMuted property − videoObject.defaultMuted ...

Read More

HTML DOM Input Range stepUp() method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 187 Views

The HTML DOM Input Range stepUp() method is used for incrementing the slider control value by a specified number. If no parameter is provided, it will increment by 1. If the step attribute is specified on the range input, the stepUp() method will increment in multiples of that step value. For example, if step="20" then stepUp(2) will increment by 20 × 2 = 40. Syntax Following is the syntax for the Range stepUp() method − rangeObject.stepUp(number) Parameters number − An optional parameter that specifies the increment value for the slider control. If omitted, ...

Read More

HTML oncut Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 131 Views

The HTML oncut event attribute is triggered when a user cuts content from an HTML element. This event fires when the cut operation is performed using Ctrl+X keyboard shortcut, right-click context menu, or any other method that removes selected content to the clipboard. Syntax Following is the syntax for the oncut event attribute − Content Where script is the JavaScript code to execute when the cut event occurs. Parameters The oncut event attribute accepts the following parameter − script − Specifies the JavaScript code or function to run when the ...

Read More

HTML vs XML

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 806 Views

HTML and XML are both markup languages that use tags to structure information, but they serve fundamentally different purposes. HTML (HyperText Markup Language) is designed for creating and displaying web pages with predefined elements, while XML (eXtensible Markup Language) is a flexible data format used primarily for storing and transporting structured data. HTML (HyperText Markup Language) HTML stands for HyperText Markup Language, which is used to describe the structure and presentation of web pages. It consists of various HTML elements composed of opening tags, content, and closing tags. HTML creates hypertext documents that can link to other pages ...

Read More

HTML oncontextmenu Event Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 233 Views

The oncontextmenu event attribute in HTML is triggered when a user right-clicks on an element to open the context menu. This event allows developers to customize behavior when the context menu appears, such as displaying custom menus or preventing the default context menu from showing. Syntax Following is the syntax for the oncontextmenu event attribute − Content The script can be a JavaScript function call or inline JavaScript code that executes when the user right-clicks on the element. Parameters The oncontextmenu event handler receives an event object as a parameter with the ...

Read More

HTML DOM Video duration Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 276 Views

The HTML DOM Video duration property returns the duration of a video in seconds as a numeric value. This read-only property is essential for creating custom video controls, progress bars, and displaying video information to users. Note − For live streams, the duration property returns Infinity because live content has no predefined end time. Syntax Following is the syntax for accessing the duration property − videoObject.duration Return Value The duration property returns a numeric value representing − The length of the video in seconds (for recorded videos) Infinity for live ...

Read More

HTML DOM Location search Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 208 Views

The Location search property returns or sets the query string portion of a URL, including the leading question mark (?). This property allows you to read the search parameters from the current URL or programmatically modify them. Syntax Following is the syntax for getting the search property − location.search Following is the syntax for setting the search property − location.search = searchString Parameters searchString − A string representing the query parameters, including the leading question mark. For example: "?name=john&age=25" Return Value Returns a string containing the query ...

Read More

HTML DOM Input Range type property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 201 Views

The HTML DOM Input Range type property is associated with input elements having type="range". This property returns the string "range" for range input elements, confirming their input type programmatically. The range input type creates a slider control that allows users to select a numeric value within a specified range. The type property helps identify and validate that an input element is indeed a range slider. Syntax Following is the syntax for accessing the type property of a range input element − rangeObject.type Return Value The type property returns a string value "range" ...

Read More
Showing 2531–2540 of 8,392 articles
« Prev 1 252 253 254 255 256 840 Next »
Advertisements