HTML

HTML is the structure of a web page and CSS is its finish, the way a house has framing and paint, and good CSS needs solid HTML underneath it.

Novice · HTML · CSS · Updated

After this lesson you can

  • Tell whether a part of a web page is HTML's job (structure and content) or CSS's job (how it looks)

Key takeaways

  • HTML gives a page its structure and content, like the foundation and framing of a house.
  • CSS gives a page its look, like the paint and finishing carpentry of a house.
  • Build solid HTML first. CSS can only make a page beautiful when the structure under it is sound.

I like to think of building a web page like building a house. A good house must have a solid structure: a foundation, framed walls, a roof, floors, and stairs.

A house under construction with only its frame up: the structure comes first, like HTML

A solid foundation and framing are essential to building a house that will last. After the house is framed, and the electrical, plumbing and walls are completed, it's time for painting and finishing carpentry.

A finished living room with paint, furniture and decoration: the finish that goes on last, like CSS

HTML is like the concrete foundation and framing of your page, and CSS is like the finishing carpentry of the site.

Just like it is impossible to have beautiful finish work in a house without a solid foundation, it is critical to also have a solid HTML foundation for your website that CSS can build on to create a beautiful design.

Check yourself

2 questions to try on the lesson page.

So what

Every web page you build has both halves: get the HTML structure right first, and the CSS has something solid to dress up.

Key terms