- Trending Categories
- Data Structure
- Operating System
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Multi-Column Layout for Text Flow using HTML.
The HTML <multicol> tag is used to create multiple columns of text and lets you control the size and number of the columns. The <multicol> tag can contain any other HTML content, much like the <div> tag. All of the content within the <multicol> tag is displayed just like conventional content, except that Netscape 4 places the contents into multiple columns instead of just one.
Note − This tag is supported by Netscape 3 and higher versions only.
The following are the attributes −
|cols||number||specifies the number of text columns for the text display. The browser attempts to flow elements evenly across the columns to make each column be about the same height. Unless the WIDTH attribute is present, column width is adjusted to fill the available width.|
|gutter||number||specifies the distance between each column in pixels.|
|width||number||specifies the width of each column in pixels. All columns are the same width. If this attribute is not present, its value is calculated from the gutter width and the number of columns.|
You can try the following code to add multi-column layout for text flow −
<h1>Breaking News</h1> <multicol cols = 3> <p>State media said more than 2,000 soldiers, police and miners closed the breach in the dike in Shandong province early Sunday and installed pipes and five high-speed pumps, but gave no indication if there were any signs of life.</p> <p>The Huayuan Mining Co. mine flooded on Friday afternoon when the Wen river burst a dike, sending water pouring into a shaft and trapping 172 miners, Xinhua and state television said.</p> </multicol>
- How to create multi-column layout in HTML5 using tables?
- How to set alignment to text in text flow layout?
- How to wrap the text in text flow layout in JavaFX?
- How to create a text flow layout in JavaFX?
- Create a Column Layout using CSS
- How to Create a Multi-line Text Input (Text Area) In HTML?
- How to add various fonts to text using text flow in JavaFX?
- How to use a textarea (a multi-line text input field) in HTML?
- CSS3 Multi-Column column-count Property
- CSS3 Multi-Column column-rule Property
- CSS3 Multi-Column column-fill Property
- CSS3 Multi-Column column-gap Property
- CSS3 Multi-Column column-span Property
- Bootstrap complex form layout for combined vertical/inline fields with HTML
- CSS3 Multi-Column Property