Favorites

Page Layout - HTML Tutorial

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

So far, your pages have been a single column of content, with each block stacked under the one before. Real websites usually need more: a header with a logo and navigation, a main content area, perhaps a sidebar, and a footer. They also need to look good on screens of every size, from phones to large monitors.

This chapter shows you how to structure and arrange whole pages using modern HTML and CSS.

By the end of this chapter, you'll be able to:

  • structure a page with meaningful elements such as header, nav, main and footer
  • arrange items in a row or column with Flexbox
  • build two-dimensional layouts, such as card grids, with CSS Grid
  • make pages that adapt to any screen size using media queries

Sections in This Chapter

Semantic Layout

Use HTML's layout elements to give every part of your page a clear purpose.

Flexbox Basics

Line items up in a row or column, space them out, align them and center things in both directions.

Grid Basics

Create rows and columns at the same time, from simple card grids to complete page layouts.

Responsive Design Basics

Make your pages work well on phones, tablets and desktops with flexible sizes and media queries.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee