index.htmlNew tabMy pageHello!Hello!Hi there!I love coffee.About1<!DOCTYPE html>2<title>My page</title>3<h1>Hello!</h1>4<p>I <em>love</em> coffee.</p>5<a href="about.html">About</a>CSSJS<h1>opening tagHello!content</h1>closing tag<a href="about.html">opening tag + attributeAboutcontent</a>closing tag<title><h1><p><em><a>CSSJS
Front left: the HTML file (text with tags) and one element taken apartBack right: the browser, which reads the file and draws the pageChips: each element travelling from its line to the part of the page it becomesFront left: index.html, five lines of HTML on a card, and one element taken apart into opening tag, content and closing tag. Back right: a web browser with a tab, an address bar and a page. As the browser reads each line, a tag chip hops from the line to the browser and the element appears: the title on the tab, a big heading, a paragraph with one word in italics, and an underlined link. The CSS tile then turns the heading teal, and the JavaScript tile changes its text. The browser reads the whole file in order and builds the page from it almost at once. The figure draws one element per step so you can follow it.

Text with tags

  1. HTML (HyperText Markup Language) describes the structure of a web page: which part is a heading, which is a paragraph, which is a link. It is plain text, typed in any editor and saved as a file such as index.html.

The browser draws it

HTML and friends

What happens

;; step 1/11 · html-is-text
file     index.html   (plain text, 5 lines)
  1  <!DOCTYPE html>
  2  <title>My page</title>
  3  <h1>Hello!</h1>
  4  <p>I <em>love</em> coffee.</p>
  5  <a href="about.html">About</a>
HTML     HyperText Markup Language
         it marks up text: says what each part IS

A complete page usually also has <html>, <head> and <body> tags. The HTML standard lets you leave them out, and the browser adds them for you, so these five lines make a working page. A later lesson shows the full shape. The browser reads the whole file in order and builds the page from it almost at once. The figure draws one element per step so you can follow it.