10.07.2017 Views

246996016-HTML5-Step-by-Step

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

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

Key Points 161<br />

Key Points<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Valid graphics formats for Web use are GIF, PNG, and JPG.<br />

When possible, use graphics files that are as close as possible in resolution to the<br />

size at which they will be displayed on the Web page. Use a photo-editing program<br />

to change the resolution.<br />

Use the tag to insert an image. The src attribute specifies the image file<br />

name.<br />

To refer to a graphic in a subfolder, precede the name with the subfolder name and<br />

a slash (/).<br />

To allow a graphic to float to the left or right of the text, use a style ”float: left” or<br />

style ”float: right” attribute within the tag.<br />

To force text to be positioned below an image, add style ”clear: left” or style ”clear:<br />

right” to the opening tag of the text.<br />

To size an image proportionally, specify a height or width for it as an attribute in<br />

the tag. To size an image and distort it if needed, specify both a height and<br />

a width.<br />

To make a graphic into a hyperlink, enclose it in an tag.<br />

To use thumbnail images, create a smaller, low-resolution version of each image,<br />

and then hyperlink it to the high-resolution version.<br />

As a contingency in the event that an image cannot be viewed, you can include<br />

a text explanation of the image in a pop-up box <strong>by</strong> inserting an alt attribute to<br />

specify alternate text.<br />

Enclose an image, or a group of images that should have a single collective caption,<br />

in a two-sided container. This allows you to then assign a caption with the<br />

tag.

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

Saved successfully!

Ooh no, something went wrong!