HTML and CSS

In this chapter we will look at the structure of a web page and how a page is built. HTML is the framework that defines the different regions and content of the page, while CSS is the artist that makes the page look beautiful.

Updated

HTML and CSS Overview

  1. HTML (Novice): 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.
  2. The Power of CSS (Novice): CSS Zen Garden shows one HTML page styled many completely different ways, proof of how much CSS alone can change.

HTML

  1. HTML (Novice): HTML builds a page from elements, each an opening tag, content and a closing tag, and whether an element is block, inline or inline-block decides how it takes up room on the page.
  2. Semantic HTML (Apprentice): Semantic elements such as strong, nav, main and footer say what their content means, so the HTML describes the content and CSS handles the formatting.
  3. CSS (Novice): A CSS rule finds elements with a selector (by element name, class or id) and formats them with the properties inside its curly braces, such as color, border, width and display.
  4. Developer Tools (Apprentice): Every browser has built-in developer tools that show any element on a page, its HTML and every CSS rule applied to it, so you can find out why a page looks the way it does.