Embedding Photos: Condiment and Spice
Ever notice in magazines and newspaper articles that the editors will insert photos and other graphics, either of the subject or of something that complements the subject in some way? Using visual elements to accentuate text is a long established procedure, and is not just used to provide visual aids in how-tos or tutorials.
Photos accompanying news or stories of events set context, and also help frame the event in the user's mind. We are creatures who wrote with pictures at one time before we developed abstract languages and alphabets; we've not lost that need for visual reaffirmation of a story.
In other types of written works, the use of graphics draws the eye, can break up long passages of writing, and serves as a subtle accent to the core offering—like how the good use of spice makes all the difference between a good recipe and a really great one. Even the madly popular Harry Potter books had illustrations at the beginning of each chapter that helped frame the characters in our minds.
Prep
Adding a photo to a piece of writing is as simple as using an img element within the writing. A CSS style setting informs the browser how the image exists relative to the text, and adding an informative alt attribute ensures that those who visualize with senses other than sight have a chance to participate.
An img element is not a block element. In Figure 4-12, the text follows immediately after the image.
Figure 4-12. Inserting an image into a paragraph using ...