Exercise 1 : -
Insert images
This example demonstrates how to display images in your Web page.
This example demonstrates how to display images in your Web page.
<html>
<body>
<p>
An image:
<img src="constr4.gif"
width="144" height="50">
</p>
<p>
A moving image:
<img src="hackanm.gif"
width="48" height="48">
</p>
<p>
Note that the syntax of inserting a moving image is no different from that of a non-moving image.
</p>
</body>
</html>
Exercise 2 : -
Insert images from different locations
This example demonstrates how to display images from another folder or another server in your Web page.
This example demonstrates how to display images from another folder or another server in your Web page.
<html>
<body>
<p>
An image from another folder:
<img src="/images/netscape.gif"
width="33" height="32">
</p>
<p>
An image from W3Schools:
<img src="http://www.w3schools.com/images/ie.gif" width="73" height="68">
</p>
</body>
</html>
Exercise 3 : -
Background image
This example demonstrates how to add a background image to an HTML page.
This example demonstrates how to add a background image to an HTML page.
<html>
<body background="background.jpg">
<h3>Look: A background image!</h3>
<p>Both gif and jpg files can be used as HTML backgrounds.</p>
<p>If the image is smaller than the page, the image will repeat itself.</p>
</body>
</html>
Exercise 4 : -
Aligning images
This example demonstrates how to align an image within the text.
This example demonstrates how to align an image within the text.
<html>
<body>
<p>
An image
<img src="hackanm.gif"
align="bottom" width="48" height="48">
in the text
</p>
<p>
An image
<img src ="hackanm.gif"
align="middle" width="48" height="48">
in the text
</p>
<p>
An image
<img src ="hackanm.gif"
align="top" width="48" height="48">
in the text
</p>
<p>Note that bottom alignment is the default alignment</p>
<p>
An image
<img src ="hackanm.gif"
width="48" height="48">
in the text
</p>
<p>
<img src ="hackanm.gif"
width="48" height="48">
An image before the text
</p>
<p>
An image after the text
<img src ="hackanm.gif"
width="48" height="48">
</p>
</body>
</html>
----------------------------------------------------------
** If you like this post please like our page in facebook
0 comments:
Post a Comment