Webpages
Write a small webpage in HTML, CSS and JavaScript, run it next to the code, debug it in a real console, and share it with a link.
See webpages on the product pageOn this page
Start from a starter
- 1
Create a webpage
Open Webpages and press New webpage. Start a webpage opens with five starters, each running live in its card.
- 2
Pick one
Landing hero (a headline, two calls to action and a counting stat), Snake (a canvas game with keys, swipe and a pad), Counter (one button, one number), Live HTML (one full document) or Blank.
- 3
Use it
Press Use {starter}. The files are written and saved at once.
Edit and run
Switch between View, where the webpage fills the stage, and Edit, where code sits beside the preview. A webpage has three files: index.html, style.css and script.js.
Run
Runs the current code fresh and saves; also ⌘↵ in the editor
Live
Re-runs the preview a moment after you stop typing; turn it off to run by hand
Fit / Tablet / Phone
Preview at full size, at 768 × 1024 or at 390 × 844
Reload
Restarts the preview
Open in tab
Opens the webpage as a plain page in a new browser tab
Fullscreen
Fills the window with the running webpage
The code editor
- Autocomplete, bracket matching and closing, code folding, multiple cursors and rectangular selection with ⌥-drag.
- ⌘F for find and replace; ⌘S saves at once (it also saves a second after you stop typing).
- File tabs show each file’s line count and a dot when it has unsaved changes. Copy this file copies the open file.
- On a touch device a key bar adds Tab, the brackets and symbols, Undo and Run above the keyboard.
Console and errors
The Console panel shows everything the webpage logs, warnings, errors and failed promises, each linked to its line in script.js. Type an expression in “Evaluate in the webpage… (↵)” and it runs inside your webpage; the result comes back as a row.
Tip: Fix line N
An uncaught error pins a strip to the preview with Fix line 12: press it and the editor opens script.js with that line selected.
What a webpage can reach
Run its own script and styles
Load scripts from elsewhere
Load images, fonts, stylesheets and media over https
Open frames or plugins
Call any public https API
Submit forms to another site
Read whether the workspace is light or dark
Read your workspace data or your session
Share and export
- Publish it with Anyone with the link: visitors get the running webpage in View mode, still sandboxed.
- Export as HTML downloads one standalone page with the code inlined.
- Export as Source (.zip) downloads index.html, style.css and script.js as written.
- Embed it in a document as a card that opens it.
Limit: What webpages don’t do
A webpage is three files you write: no packages, frameworks loaded from elsewhere or extra files. It doesn’t read or write your tables or tasks, and it lives at its share link rather than its own web address.