Page 76 - Touchpad_Plus_V3.2_Class 8
P. 76
Some commonly used CSS properties associated with the <img> tag are as follows:
CSS Property Description Example
WIDTH Sets the width of the image. IMG { WIDTH: 300px; }
HEIGHT Sets the height of the image. IMG { HEIGHT: 200px; }
BORDER Adds a border around the image. IMG { BORDER: 2px SOLID
BLACK; }
BORDER-RADIUS Rounds the corners of the image. IMG { BORDER-RADIUS: 10px; }
FLOAT Aligns the image to the left or IMG { FLOAT: left; }
right.
MARGIN Adds space around the image. IMG { MARGIN: 10px; }
PADDING Adds space inside the border of IMG { PADDING: 5px; }
the image.
Imagine, creating a website that hosts interactive debates and discussions. How would
you use HTML to structure the conversation and incorporate multimedia content?
Design a web page that would foster meaningful exchanges among participants?
Let us use the <IMG> tag to insert an image on the web page in the following way:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE>Inserting Image</TITLE>
</HEAD>
<BODY>
<B>Inserting image on the web page</B>
<IMG SRC="lily.jpg" WIDTH="200" HEIGHT="200" STYLE="float: right; border:
2px solid black;">
</BODY>
</HTML>
Output
74 Plus (Ver. 3.2)-VIII

