Exercise 5 : -
Let the image float
This example demonstrates how to let an image float to the left or right of a paragraph.
This example demonstrates how to let an image float to the left or right of a paragraph.
<html>
<body>
<p>
<img src ="hackanm.gif"
align ="left" width="48" height="48">
A paragraph with an image. The align attribute of the image is set to "left". The image will float to the left of this text.
</p>
<p>
<img src ="hackanm.gif"
align ="right" width="48" height="48">
A paragraph with an image. The align attribute of the image is set to "right". The image will float to the right of this text.
</p>
</body>
</html>
Exercise 6 : -
Adjust images to different sizes
This example demonstrates how to adjust images to different sizes.
This example demonstrates how to adjust images to different sizes.
<html>
<body>
<p>
<img src="hackanm.gif"
width="20" height="20">
</p>
<p>
<img src="hackanm.gif"
width="45" height="45">
</p>
<p>
<img src="hackanm.gif"
width="70" height="70">
</p>
<p>
You can make a picture larger or smaller changing the values in the "height" and "width" attributes of the
img tag.
</p>
</body>
</html>
Exercise 7 : -
Display an alternate text for an image
This example demonstrates how to display an alternate text for an image.
This example demonstrates how to display an alternate text for an image.
<html>
<body>
<img src="goleft.gif" alt="Go Left" width="32" height="32">
<p>
Text-only browsers cannot display images and will only display the text that is specified in the "alt" attribute for the image. Here, the "alt"-text is "Go Left".</p>
<p>
Note that if you hold the mouse pointer over the image, most browsers will display the "alt"-text.
</p>
</body>
</html>
----------------------------------------------------------
** If you like this post please like our page in facebook
0 comments:
Post a Comment