Web Development Articles

Page 43 of 801

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 556 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

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

How to Make the Text Input Non-Editable

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

In an HTML document, the tag is used to represent a form input control. In most cases, the input tag is used within the element to declare input controls that allow users to enter data. Depending on the type attribute, an input field can be of various types. The input tag is a self-closing element with only attributes. Labels for the input element can be defined using the tag. By setting the appropriate type attribute, it can be used to represent text fields, checkboxes, dropdowns, buttons, and other inputs. The value attribute is used to specify ...

Read More

How to Make HTML dt and dd Elements Stay on the Same Line

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

HTML Description List or Definition List displays elements in dictionary format. The and tags are used together within the tag to define terms and their descriptions. By default, and elements display on separate lines, but CSS can be used to make them appear side by side on the same line. Default Description List Behavior Let us first see how description lists appear by default − Default Description List Programming Languages ...

Read More

How to Display Ellipsis in the span Element Having Hidden Overflow?

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

The element is a generic inline container used for styling text portions and grouping inline content. When text content within a element overflows its container boundaries, it can disrupt the layout. The ellipsis (...) provides a visual indicator that text has been truncated, maintaining clean layout while showing that more content exists. Displaying ellipsis in a span element requires combining CSS properties for overflow handling and text truncation. This technique is essential for responsive designs where text must fit within fixed-width containers. Syntax Following is the basic syntax for a span element − ...

Read More

How to Set the Table Column Width Regardless of the Text Amount in its Cells?

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

HTML tables display data in rows and columns using the element. By default, table columns automatically adjust their width based on content, which can disrupt layout consistency. When one cell contains more text, the entire column expands, affecting the table's appearance. The Problem with Default Table Behavior Let us first understand how tables behave by default when content varies − Default Table Column Width table, td, th { border: 1px ...

Read More

How to Style Even and Odd List Items?

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

Lists are a collection of items that are thought to be one of the best ways to represent information. The list element in HTML is the one that helps us structure the content on our page. It is one of the most commonly used elements, whether for navigation or for displaying general content. HTML allows us to represent lists in three ways: ordered lists, unordered lists, and description lists. Unordered List: This type of list is used to represent HTML items that are not in any particular order. The tag is employed to define unordered lists. ...

Read More
Showing 421–430 of 8,010 articles
« Prev 1 41 42 43 44 45 801 Next »
Advertisements