HTML Layout Templates
Download 40 free HTML layout templates created with CSS float property and negative margins. Use them for your website.
Here is a collection of HTML templates providing basic website layouts.
Each layout includes the following five main sections that are used on any website:
-
header
-
footer
-
navigation menu
-
main content area
-
extra stuff
Almost all layouts are created with the CSS float property and negative margins. When working with negative margins on floated elements, keep in mind: applying a negative margin on the float side pulls the element further in that direction, while applying it opposite the float creates a gap that can cause adjacent content to overlap. For example, <div style="float: left; margin-right: -100%;"> pulls the next floated element directly beside it. This overlapping effect is often used to create liquid layouts.
In modern web development, float-based layouts are largely replaced by CSS Flexbox and CSS Grid, which provide more reliable and responsive layout control. Floats are now primarily used for text wrapping around images.
Customizing Templates
Here you can find a few ways to customize your HTML template:
- Add graphics or images to the template structure.
- Modify the HTML structure or replace placeholder content.
- Learn HTML with our HTML tutorial.
- Learn how to change template styles with our CSS tutorial.
- Learn how to make templates interactive with our JavaScript tutorial.
Practice
What are the key elements in an HTML layout template?