HTML Articles

Page 55 of 151

HTML DOM Object form Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 249 Views

The HTML DOM Object form property returns a reference to the form element that contains an element. This property is read-only and provides a way to access the parent form from within JavaScript when working with object elements. Syntax Following is the syntax for accessing the form property − ObjectElement.form Return Value The property returns a reference to the HTMLFormElement that contains the object, or null if the object element is not enclosed within a form. Example Following example demonstrates how to use the Object form property to get a ...

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

How to Force the Content Of the Div Element to Stay on the Same Line?

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

The or division tag is used to group HTML elements in a web page, allowing us to create distinct sections with similar functionality that can be easily styled using the id or class attribute. A HTML is a block-level element that, by default, does not display any other HTML elements adjacent to it. Div is the most useful tag in web development because it allows us to separate data in web pages and create specific sections for specific data or functions in web pages. It is used in pairs. The content is written in between the opening ...

Read More

How to Disable Word Wrapping in HTML?

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

Word wrapping is the process of automatically moving text to the next line when it reaches the edge of its container. In HTML, text within an element wraps according to the boundaries of that element by default. However, there are situations where you may want to disable word wrapping to keep text on a single line or preserve specific formatting. Default Word Wrapping Behavior By default, HTML elements wrap text content when it exceeds the container's width. Let us see this behavior with an example − Default Word Wrapping ...

Read More

How to Display an Ordered List with Nested Counters?

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

A list is a record of short pieces of related information used to display data or any information in web pages in an ordered or unordered form. Lists are used to group related pieces of information together so that they are clearly associated with one another and easy to read. They are beneficial from a structural point of view because they aid in the creation of a well-structured, more accessible, and easy-to-maintain document. HTML lists enable web developers to organize a collection of related items into lists. There are three types of lists in HTML, each with its own ...

Read More

How to Divide a Horizontal Line into Multiple Parts?

Eesha Gandhi
Eesha Gandhi
Updated on 16-Mar-2026 545 Views

In HTML, the tag stands for horizontal rule and is most commonly displayed as a horizontal line used to separate content or define a change in an HTML page. The tag is an empty element that does not require a closing tag. While the standard creates a single continuous line, we can divide it into multiple parts using CSS properties to create visually appealing section dividers. Syntax Following is the basic syntax for the element − The tag supports several deprecated attributes like align, color, noshade, size, ...

Read More

How to Handle Page Breaks when Printing a Large HTML Table?

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

When printing HTML tables with many rows, page breaks can split table rows awkwardly, disrupting the layout and making the printed output difficult to read. This tutorial explores CSS properties and techniques to control how large tables break across pages during printing. Understanding Page Break Properties CSS provides three page-break properties that control how elements behave when printed across multiple pages. These properties help create professional-looking printed documents by managing where page breaks occur. page-break-before Property The page-break-before property controls whether page breaks should occur before an element − page-break-before: auto|always|avoid|left|right; ...

Read More

HTML DOM Time dateTime Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 129 Views

The HTML DOM Time dateTime property is used to get or set the datetime attribute of a element. This attribute provides a machine-readable format for dates and times, making content more accessible to browsers, search engines, and assistive technologies. Syntax Following is the syntax for getting the dateTime property − timeObject.dateTime Following is the syntax for setting the dateTime property − timeObject.dateTime = "YYYY-MM-DDThh:mm:ssTZD" DateTime Format Components The datetime value follows the ISO 8601 standard format. Here are the components of YYYY-MM-DDThh:mm:ssTZD − Component ...

Read More

HTML DOM TouchEvent altKey Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 130 Views

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

Read More

How to Increase the Space Between the Dots of Dotted Borders?

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

The border shorthand CSS property defines the border of an element. It specifies the border-width, border-style, and border-color values. When using border-style: dotted, the default spacing between dots is controlled by the browser and cannot be directly modified using standard border properties. However, we can create custom dotted borders with increased spacing between dots using CSS background properties. This technique gives us complete control over dot size, spacing, and appearance. Default Dotted Border Behavior The standard border-style: dotted creates evenly spaced dots with fixed spacing determined by the browser. Let's see the default appearance − Example ...

Read More
Showing 541–550 of 1,509 articles
« Prev 1 53 54 55 56 57 151 Next »
Advertisements