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!
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.
Settings
View
Font size
14
Code
Preview
Delay
Zoom
Share
Reset
Preview
Currently previewing:
Dimensions0 × 0
Delay
Preview paused
Click to resume
Click to resume
The preview is disabled for this demo.
Use the console below.
Use the console below.
Console
›