10.07.2015 Views

Building the User Interface by Using HTML5: Text, Graphics ... - server

Building the User Interface by Using HTML5: Text, Graphics ... - server

Building the User Interface by Using HTML5: Text, Graphics ... - server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Building</strong> <strong>the</strong> <strong>User</strong> <strong>Interface</strong> <strong>by</strong> <strong>Using</strong> <strong>HTML5</strong>: <strong>Text</strong>, <strong>Graphics</strong>, and Media | 37✚ MORE INFORMATIONTo learn more about displaying images on Web pages, go to http://bit.ly/Kgg1ab. You can find out more aboutimage maps at http://bit.ly/hincW5.DISPLAY AN IMAGE IN A WEB PAGEGET READY. To display an image in a Web page, perform <strong>the</strong> following steps:1. Locate a JPG, PNG, GIF, or BMP file on your computer to use in this exercise. The imagecan depict anything you want, but something to do with pets would be most appropriate.2. In your editing tool, open L2-pet-mark.html.3. Remove <strong>the</strong> tags from <strong>the</strong> first paragraph.4. Insert <strong>the</strong> following markup after <strong>the</strong> h1 element, leaving a blank line before andafter it, and replacing dogwalk.jpg with your own image file:Happy dogs are good dogs5. Create a new file <strong>by</strong> saving it as L2-pet-image.html and view it in a Web browser.The page should look similar to Figure 2-12.LICENSED PRODUCT NOT FOR RESALEFigure 2-12The Web page with an imageIllustration: © MightyIsland/iStockphoto6. Leave <strong>the</strong> editing tool and Web browser open if you’re continuing immediately to <strong>the</strong>next exercise.USE THE FIGURE AND FIGCAPTION ELEMENTSGET READY. To display an image in a Web page, perform <strong>the</strong> following steps:1. Locate two additional JPG, PNG, GIF, or BMP files to use in this exercise. The imagecan depict anything you want, but something to do with pets would be most appropriate.You should have three images to work through <strong>the</strong>se steps.2. In your editing tool, open L2-pet-image.html if it’s not already open.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!