Chapter 11. Images and Multimedia

It’s hard to imagine today, but the first web pages were just text. You could link to images and view them in separate windows, but the rest of the page and images were presented separately. The NCSA Mosaic browser felt revolutionary in large part because it supported images presented inline with the text, and other inline media followed suit shortly thereafter, especially after the authoring platform known today as Flash was launched in 1996.

Many of the production principles worked out during the Web’s infancy remain relevant after 15 years, in no small part because support for the two basic multimedia elements—img and object—has evolved slowly since their introduction. Those principles are applied alongside more recently developed practices intended to minimize the demands placed upon server and browser software.

Replaced Elements

If you look through the HTML 4.01 and CSS 2.1 specifications, you’ll discover that some elements are described as “replaced.” However, the specifications are predictably obtuse about what replaced elements are, and how they behave. Section 3.1 of the CSS 2.1 specification has this to say:

[A replaced element is] an element whose content is outside the scope [emphasis mine] of the CSS formatting model, such as an image, embedded document, or applet. For example, the content of the HTML IMG element is often replaced by the image that its “src” attribute designates. Replaced elements often have intrinsic dimensions: an intrinsic ...

Get HTML & CSS: The Good Parts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.