Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Part 1: HTML (10 min)

Goal

Get comfortable with HTML as a tree of elements, view it in a browser, and inspect it with devtools.

What's here

  • index.html — a minimal page with a heading, an input, a button, and a list

Run it

In VS Code, right-click index.htmlOpen with Live Server. A browser tab opens at http://localhost:5500 (or similar) and auto-reloads on save.

If you're in Codespaces, Live Server will pop up a "open in browser" notification — accept it.

Try this

  1. Open browser devtools (F12), click the Elements tab. You're looking at the live DOM (Document Object Model) — the browser's in-memory tree of your HTML.
  2. Double-click any text in devtools and edit it. The page updates instantly. This is editing the DOM directly; refresh and your changes vanish.
  3. Add a new <li> to the list in index.html, save, watch the browser reload.
  4. Try wrapping a word in <strong> or <em> to see inline elements vs block elements.

Mental model

  • HTML is a tree of elements. Each element has a tag, optional attributes (id="task-input"), and children.
  • Block elements (div, ul, h1, p) stack vertically and take full width by default.
  • Inline elements (span, a, strong, em) flow horizontally within a line of text.
  • IDs (id="task-input") are unique per page. Classes (class="row") can repeat. JS and CSS use these to target elements.

What's missing (deliberately)

No styling — it looks raw and ugly. No interactivity — the button does nothing. That's the next two parts.

Next

Part 2: CSS