CHAPTER 64
CSS Multiple Columns
Learn how to divide text content into multiple newspaper-style columns.
01. What is CSS Multiple Columns?
CSS multi-column layout divides text into columns.
column-count controls the number of columns.
column-gap controls the space between columns.
02. Syntax
.content {
column-count: 3;
column-gap: 30px;
}
03. Example
CSS / HTML Example
AIFA Coding Lab
<!DOCTYPE html>
<html>
<head>
<style>
.article {
column-count: 3;
column-gap: 30px;
line-height: 1.8;
}
</style>
</head>
<body>
<div class="article">
AIFA Infotech provides practical
computer education and professional
technology training. Students can
learn web development, digital
marketing, data analytics and other
useful technical skills.
</div>
</body>
</html>
04. Important Points
✓
column-count defines the number of columns.
✓
column-gap controls spacing.
✓
column-width can control desired column width.
✓
Multi-column layouts are particularly useful for text.
05. Common Mistakes
⚠
Creating too many narrow columns.
⚠
Using multi-column layout for complex UI cards.
⚠
Ignoring mobile readability.
06. Real World Use
Multi-column CSS is useful for articles, magazines, documentation and long-form text layouts.
Ready to Practice? 🚀
Open the AIFA CSS Editor and practice this chapter live.
Try It Yourself →
Practice Exercise
Create a Two-Column Article
Create a paragraph section with two columns and a 30px gap.