10.07.2017 Views

246996016-HTML5-Step-by-Step

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Inserting Graphics 145<br />

To refer to an image that is stored somewhere else—perhaps on your company’s main<br />

Web server or at a partner’s server—use the complete absolute URL to the file, as shown<br />

in the following:<br />

<br />

By default, unless you place the image within a block-level tag such as a paragraph or<br />

heading, an image blocks off all the horizontal space across the rest of the page—even if<br />

the image itself takes up only a fraction of the available horizontal space.<br />

To force an image to render on the left or right side of the screen and wrap surrounding<br />

text around the image, apply a float style rule that uses a left or right attribute, like this:<br />

<br />

You could also create a style rule in the area of the document or in a separate<br />

cascading style sheet that would make all images float unless otherwise specified, as<br />

shown in the following:<br />

img {float: left}

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

Saved successfully!

Ooh no, something went wrong!