How To Create Columns In HTML
Có thể bạn quan tâm
HTML columns are essential for organizing data in a structured manner, facilitating clear comparisons between two or more items. By dividing content into columns, you can enhance readability and streamline information presentation on our web pages. In this answer, we will explore how to create columns in an HTML page.
Defining columns in HTML
An HTML column is defined in the <div> tag using the class = "column" keyword. More columns can be added by adding more divs with the same class. The following syntax is used to add columns in HTML.
- <div class="row"> tag is used to initialize the row where all the columns will be added.
- <div class="column" > tag is used to add the corresponding number of columns.
- style="background-color:#aaa;" property is used to give color to the column.
- Individual properties, such as width: 50%;, are added to the columns in the style sheet for that particular div.
Example
Below is an example of how to create 2 basic columns in HTML.
Multiple columns
HTML also allows the creation of more than two columns in a single row; we can set varying widths for these columns by specifying them in the style sheet.
Relevant Answers
Explore Courses
Free Resources
Copyright ©2025 Educative, Inc. All rights reservedLearn in-demand tech skills in half the time
PRODUCTSMock Interview
NewCourses
Skill Paths
Projects
Assessments
TRENDING TOPICSLearn to Code
Tech Interview Prep
Generative AI
Data Science
Machine Learning
GitHub Students Scholarship
Early Access Courses
Blind 75
Layoffs
PricingFor Individuals
Try for Free
Gift a Subscription
CONTRIBUTEBecome an Author
Become an Affiliate
Earn Referral Credits
RESOURCESBlog
Cheatsheets
Webinars
Answers
ABOUT USOur Team
Careers
HiringFrequently Asked Questions
Contact Us
Press
LEGALPrivacy Policy
Cookie Policy
Terms of Service
Business Terms of Service
Data Processing Agreement
INTERVIEW PREP COURSESGrokking the Modern System Design Interview
Grokking the Product Architecture Design Interview
Grokking the Coding Interview Patterns
Machine Learning System Design
Tiktok Streamline Icon: https://streamlinehq.comCopyright ©2025 Educative, Inc. All rights reserved.
Từ khóa » Html Column
-
How To Create A Two Column Layout - W3Schools
-
HTML Col Tag - W3Schools
-
: The Table Column Element - HTML - MDN Web Docs - Mozilla -
HTML Table Basics - Learn Web Development | MDN
-
Grid System - Bootstrap
-
Table Visualization — Pandas 1.4.3 Documentation
-
HTML Tag » -
HTML:
Tag - TechOnTheNet -
Tables With Irregular Headers | Web Accessibility Initiative (WAI) | W3C
-
Responsive Layout Grid - Material Design
-
HTML
Tag - GeeksforGeeks -
What Are HTML Columns, And How Do You Use Them?
-
How To Merge Table Columns In HTML? - Tutorialspoint