Open original
Info
Demo 1.7

Media

Text is most of the web, but it isn’t all of it. Here’s how you get pictures, video, sound and other people’s pages onto yours.

Images

<img> needs two attributes: src (where the file is) and alt (what it shows). It has no closing tag.

Please write real alt text. If the image is decorative and says nothing, use alt="" so screen readers skip it ~ but if it carries meaning, describe it.

Video and audio

<video> and <audio> both need controls, or your visitor gets a player with no buttons. The <source> inside points at the file, and anything after it is the message shown when playback fails.

Iframes

<iframe> puts somebody else’s page inside yours. This is how embedded maps, videos and, yes, DEMOLAND demos work. Give it a title so screen readers can announce what it is.

Where files live

src="cat.jpg" looks for cat.jpg next to your HTML file. In the editor here, drag a file straight in and it becomes part of the demo.

Next demoTables
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