HTML comprises various semantic elements delineating distinct sections of a webpage.
For further details on semantic elements, refer to our HTML Semantics chapter.
Four distinct methods exist for crafting multicolumn layouts, each presenting its own advantages and disadvantages.
Utilizing the CSS float property for entire web layouts is a common practice. Float is straightforward to grasp, requiring only an understanding of how the float and clear properties function. However, there are drawbacks: floating elements are intricately linked to the document flow, potentially compromising flexibility. Further insights into float can be found in our CSS Float and Clear chapter.
Example
Employing flexbox guarantees consistent behavior of elements when adapting the page layout to varying screen sizes and display devices.
Example
The CSS Grid Layout Module provides a grid-centric layout system featuring rows and columns, simplifying webpage design without necessitating the use of floats and positioning.
Example