We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Technology

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What Are HTML Columns?

By Eugene P.
Updated: May 17, 2024
Views: 5,524
Share

In HyperText Markup Language (HTML) documents, columns are a way to define an area of a website that generally has a width smaller than the total displayable width of a page. HTML columns allow web page designers to use formatting similar to print formatting without having to resort to unreliable tricks, such as blank images, to create spacing. Each column also can use standard elements to define its width, alignment and spacing. Traditionally, HTML columns were just one part of a larger HTML table, although the introduction of cascading style sheets (CSS) made it possible to define a column without having to create an entire table. There are some formatting and compatibility problems that come with using HTML columns, although these can largely be overcome with careful design and coding.

HTML columns originally were one part of a larger formatting structure known as a table. An HTML table can be thought of as a grid, with each square in the grid called a cell. A column is a collection of cells that are lined up consecutively and run from top to bottom. A table usually has multiple columns. Each cell in a column can have its own independent formatting and spacing, as well as being able to span more than one row.

With CSS, HTML columns are actually not part of a table, but are divisions of space nested inside other divisions. This allows multiple columns like an HTML table, except that the features of CSS permit the exact same formatting to be effortlessly applied to many pages throughout a single site. Using CSS to form columns, however, does cause problems with the implementation of the division tags in certain browsers in which the alignment and treatment of columns and their content does not adhere to accepted standards.

The width of HTML columns can be specified in a document’s code, either by stating the exact pixel dimensions or through a relative percentage measurement. This means a column can be created by stating it is 200 pixels across or 25 percent of the width of the viewer display. Specifying the pixel dimensions of a column can help to ensure that images and other advanced layout elements are perfectly arranged and scaled, although it means the page might appear much larger or smaller than desired at various screen resolutions. Creating a column using relative percentages means the column will scale to the desire dimensions no matter what the viewer’s screen size is, but leads to issues in which the content of the column might be displayed incorrectly because of extra or insufficient space.

Share
WiseGeek is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.

Editors' Picks

Discussion Comments
Share
https://www.wisegeek.net/what-are-html-columns.htm
Copy this link
WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.

WiseGeek, in your inbox

Our latest articles, guides, and more, delivered daily.