HTML Image

40 views

 HTML  images are defined  <img> tag. 

The <img> tag is empty, it contains attributes only and it has no closing tag.

 you need to use the src attribute. Src stands for “source”. The value of the src attribute is the URL of the image you want to display on your page.

<img src=”url”>

<img src=”banner.gif” width=”20%” height=”20%”>

How to add a background image to an HTML page.

<html>
<body background=”banner.gif”>
<h3> A background image.</h3><p>this is my first image.</p>

<p>this is image text.</p>

</body>
</html>

How to let an image float to the left or right of a paragraph.

<html>
<body>

<p>
<img src =”home.gif” align =”home” width=”48″ height=”48″>

A paragraph with an image. this image in align tag..
</p>

<p>
<img src =”home.gif” align =”right” width=”48″ height=”48″>

A paragraph with an image. this image in align tag..
</p>

</body>
</html>

How to adjust images to different sizes.

<html>
<body>

<p>
<img src=”home.gif” width=”20″ height=”20″>
</p>

<p>
<img src=”home.gif”width=”45″ height=”45″>
</p>

<p>
<img src=”home.gif” width=”70″ height=”70″>
</p>

<p>
this is my photo…
</p>

</body>
</html>



« Lesson 3. Variables in javascript HTML Background »
Posted on Thursday, June 19th, 2008 at 12:52 pm under HTML for Beginners | RSS 2.0 Feed

Post Comment

You must be logged in to post a comment.



ComputerEducationWorld.com All Rights Reserved © RSS | CBSE | Education Boards Of India | What is My IP?