Open original
Info
Demo 2.1

HTML is for content

Every website is built from three languages working together: HTML, CSS, and JavaScript. This chapter introduces what each one does, starting with HTML.

HTML (short for HyperText Markup Language) holds the content of a page, namely its text and media.

HTML elements

You write HTML using elements, which indicate the kind of content you’re adding. Elements start with an opening tag, like <p> for paragraphs. End an element by writing its closing tag, which is its opening tag with an additional forward slash, like </p>.

Designing a website

This page is just plain HTML, which means there’s not much we can do to change how it looks. To give it some flair, we’ll need another programming language: CSS!

Next demoCSS is for design
Keyboard Shortcuts
⌘ Z / ⌘ ⇧ ZCtrl Z / Ctrl ⇧ Z Undo / redo
Tab / ⇧ TabTab / ⇧ Tab Indent / unindent selection
⌘ ] / ⌘ [Ctrl ] / Ctrl [ Indent / unindent lines
⌘ ACtrl A Select all
⌘ DCtrl D Select next occurrence of selection
⌘ /Ctrl / Comment / uncomment lines
Ctrl SpaceCtrl Space Autocomplete
Ctrl EnterCtrl Enter Reset layout
⌘ ⌥ [ / ⌘ ⌥ ]Ctrl ⇧ [ / Ctrl ⇧ ] Fold / unfold block
Code
The editor didn't load — try refreshing the page. Navigation, shortcuts and the info panel still work in the meantime.
Preview
Dimensions0 × 0
Delay
Console