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.
Click to resume
Use the console below.