Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML DOM KeyboardEvent charCode Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 169 Views

The KeyboardEvent charCode property returns the Unicode character code of the character that was pressed during a keyboard event. It provides a numeric representation of the character, which can be useful for character validation and input processing. Note − The charCode property is deprecated. Use the key property instead for modern applications, as it provides more accurate and readable results. Syntax Following is the syntax for accessing the charCode property − event.charCode Return Value The charCode property returns a number representing the Unicode character code of the pressed key. For non-character keys ...

Read More

HTML DOM Input Password form Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 230 Views

The HTML DOM Input Password form property is used for returning the form reference that contains the input password field. If the input password field is outside the form then it will simply return null. This property is read-only. Syntax Following is the syntax for input password form property − passwordObject.form Return Value The form property returns one of the following values − Form object − A reference to the form element that contains the password input field. null − If the password input field is not contained ...

Read More

How to make an empty div take space?

Saba Hilal
Saba Hilal
Updated on 16-Mar-2026 5K+ Views

Making an empty div take up space on a web page is a common requirement in HTML layouts. By default, an empty div has no visible dimensions because it contains no content. However, there are several methods to force an empty div to occupy visual space using CSS properties. Why Empty Divs Don't Take Space An empty div element without content has zero height and only takes up the width of its container by default. To make it visible and occupy space, we need to explicitly define its dimensions using CSS properties like height, width, or add content ...

Read More

HTML DOM KeyboardEvent code Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 149 Views

The KeyboardEvent code property in HTML DOM returns a string representing the physical key that was pressed during a keyboard event. Unlike the key property which returns the logical key value, the code property represents the actual physical key location on the keyboard, making it useful for game controls and applications that need to detect specific key positions regardless of keyboard layout. Note − The code property is layout-independent, while the key property reflects the actual character typed. Use key for text input and code for physical key detection. Syntax Following is the syntax for accessing the ...

Read More

Difference between normal links and active links

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 16-Mar-2026 2K+ Views

The hyperlinks, which are also known as links, are crucial components in websites nowadays. These are clickable and can be used to navigate between source webpage to different pages or the sections in the same webpage. In most of the websites, the links will appear as underlined and differently colored. Links are categorized into the following types − Unvisited Links − Links that haven't been clicked yet Visited Links − Links that have been clicked previously Active Links − Links currently being interacted with (mouse pressed down) Let's discuss about the links mentioned above with ...

Read More

How to use month input type in HTML?

Geetu Magoo
Geetu Magoo
Updated on 16-Mar-2026 6K+ Views

The month input type in HTML provides users with a month and year selection control. Using , you can create a form field that allows users to pick a specific month and year from a calendar-like interface. The month input control displays the selected value in YYYY-MM format, where YYYY represents the year and MM represents the month. This input type is particularly useful for forms requiring date ranges, event scheduling, or any scenario where only month and year precision is needed. Syntax Following is the basic syntax for the month input type − ...

Read More

HTML DOM Input Button name Property

karthikeya Boyini
karthikeya Boyini
Updated on 16-Mar-2026 191 Views

The HTML DOM name property is used to get or set the value of the name attribute of an input button element. This property is essential for form data submission, as the name attribute identifies the button when the form is submitted to the server. Syntax Following is the syntax for returning the name value − object.name Following is the syntax for setting the name value − object.name = "text" Here, text represents the new name value to be assigned to the input button. Return Value The name ...

Read More

HTML DOM Input DatetimeLocal name Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 132 Views

The HTML DOM Input DatetimeLocal name property gets or sets the value of the name attribute of an element. This property is essential for form submissions, as it determines the field name sent to the server when the form data is submitted. Syntax Following is the syntax to get the name property − inputDatetimeLocalObject.name Following is the syntax to set the name property − inputDatetimeLocalObject.name = "string" Return Value The name property returns a string representing the value of the name attribute. If no name attribute is set, ...

Read More

How to use time input type in HTML?

Geetu Magoo
Geetu Magoo
Updated on 16-Mar-2026 23K+ Views

The time input type in HTML allows users to select time values through a user-friendly interface. This input type creates a time picker control that displays hours and minutes, and optionally seconds, in a standardized format. The time input is created using and displays time in 24-hour format by default. Users can select hours (0-23), minutes (0-59), and optionally seconds (0-59) through an interactive time picker interface. Syntax Following is the basic syntax for the time input type − The time value follows the format HH:MM for hours and minutes, or ...

Read More

Execute a script when a mouse wheel is being scrolled over an element in HTML?

Nikitha N
Nikitha N
Updated on 16-Mar-2026 401 Views

When a mouse wheel is being scrolled over an element, the onwheel attribute triggers a JavaScript function. This event is useful for creating interactive elements that respond to scroll gestures, such as image galleries, zoom controls, or custom scroll behaviors. Syntax Following is the syntax for the onwheel attribute − Content The onwheel attribute can be used with any HTML element. The event object contains information about the scroll direction and delta values. Basic Mouse Wheel Event Example Following example shows how to execute a script when a mouse wheel is ...

Read More
Showing 13461–13470 of 61,297 articles
Advertisements