Articles on Trending Technologies

Technical articles with clear explanations and examples

HTML DOM Storage length property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 222 Views

The HTML DOM Storage length property returns the number of key-value pairs stored in the browser's storage object. This property works with both localStorage and sessionStorage objects, providing a simple way to count stored items. Syntax Following is the syntax for the Storage length property − localStorage.length sessionStorage.length Return Value The length property returns an integer representing the number of items currently stored in the storage object. If no items are stored, it returns 0. Example − localStorage Length Following example demonstrates how to get the number of ...

Read More

HTML max Attribute

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 172 Views

The max attribute in HTML specifies the maximum value for various input elements and the element. It defines the upper bound of the allowed range, ensuring that users cannot enter or display values beyond this limit. Syntax Following is the syntax for the max attribute − Where value is a number (for numeric inputs) or a date string (for date inputs) that sets the maximum allowed value. Elements Supporting Max Attribute The max attribute can be used with the following HTML elements − ...

Read More

HTML DOM Storage setItem() method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 188 Views

The HTML DOM Storage setItem() method is used to create or update a key-value pair in web storage. This method stores data in either localStorage (persistent across browser sessions) or sessionStorage (temporary for the current session) by specifying a key name and its corresponding value. Syntax Following is the syntax for the Storage setItem() method − localStorage.setItem(keyname, value); OR sessionStorage.setItem(keyname, value); Parameters The setItem() method accepts two parameters − keyname − A string representing the key name under which the data will be stored. ...

Read More

HTML DOM Variable Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 274 Views

The HTML DOM Variable Object represents the element in the DOM tree. The element is used to define variables in mathematical expressions, programming code examples, or technical documentation. When accessed through JavaScript, it becomes a DOM object with properties and methods for manipulation. Syntax Following is the syntax to create a var object using JavaScript − document.createElement("VAR"); Following is the syntax for the HTML element − variable_name Creating a Variable Object The var object can be created dynamically using JavaScript's createElement() method. Once created, you can ...

Read More

How to create div that contains the multiple fixed-size images

Aman Gupta
Aman Gupta
Updated on 16-Mar-2026 1K+ Views

Creating a div container with multiple fixed-size images is a common requirement in web development for galleries, portfolios, and product catalogs. This approach ensures visual consistency by giving all images uniform dimensions regardless of their original sizes. Syntax Following is the basic HTML structure for a div containing multiple images − Following is the CSS syntax to create fixed-size images − .image-container img { width: fixed-width; height: fixed-height; object-fit: ...

Read More

How to Control the Space between Bullets and li Elements?

Eesha Gandhi
Eesha Gandhi
Updated on 16-Mar-2026 2K+ Views

In HTML lists, controlling the space between bullet points and list items is a common styling requirement. By default, browsers apply standard spacing between bullets and text content, but this can be customized using various CSS techniques to achieve the desired visual layout. HTML provides three types of lists − Ordered List (ol) − Uses numbers or other schemes for sequential items Unordered List (ul) − Uses bullets for non-sequential items Description List (dl) − Used for term-definition pairs Default List Spacing When creating an unordered list, browsers apply default spacing between bullets and ...

Read More

HTML DOM KeyboardEvent altKey Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 153 Views

The HTML DOM KeyboardEvent altKey property returns a boolean value indicating whether the ALT key was pressed when a keyboard event was triggered. This property is particularly useful for detecting keyboard shortcuts and modifier key combinations in web applications. Syntax Following is the syntax for accessing the altKey property − event.altKey Return Value The altKey property returns a boolean value − true − If the ALT key was pressed when the event occurred false − If the ALT key was not pressed when the event occurred Example − Basic ...

Read More

How to Create a Hidden Div without a Line Break or Horizontal Space?

Eesha Gandhi
Eesha Gandhi
Updated on 16-Mar-2026 1K+ Views

The HTML div element serves as a container for grouping related content on web pages. While div elements are normally visible and take up space in the document layout, there are situations where you need to hide a div without creating line breaks or consuming horizontal space. Understanding how to properly hide div elements is crucial for creating dynamic web layouts, implementing show/hide functionality, and managing space-efficient designs. Different hiding methods produce different results in terms of space consumption and layout impact. HTML Div Element Basics The tag is a block-level container element that groups related ...

Read More

How to Change the Style of a Tag Title Attribute?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 16-Mar-2026 6K+ Views

The title attribute of HTML elements provides supplementary information that appears as a tooltip when users hover over the element. However, the default browser styling for title tooltips is often plain and may not match your website's design. This article explores methods to customize the appearance of title attribute tooltips using CSS. Default Title Attribute Behavior By default, browsers display title attributes as simple, unstyled tooltips with basic black text on a light background. These tooltips cannot be directly styled using CSS because they are rendered by the browser's native tooltip system. Example − Default Title Attribute ...

Read More

How to Create a List with Dashes in HTML?

Eesha Gandhi
Eesha Gandhi
Updated on 16-Mar-2026 8K+ Views

A list is any information that is displayed in a logical or linear format. It is a collection of items written in a meaningful group or sequence and denoted by bullet points, numbers, and so on. HTML Lists aid in the semantic display of a list of information. In HTML, there are three types of lists: Unordered list or Bulleted list (ul) The list items in an HTML unordered list are not in any particular order or sequence. Because the items are marked with bullets, an unordered list is also known as a Bulleted list. It begins ...

Read More
Showing 12901–12910 of 61,297 articles
Advertisements