Professional Documents
Culture Documents
Example:
<img src="animals.jpg">
Output:
Image size
A web browser will automatically compute the width and height for an image, but you
can set it to have a custom width and height. The width and height of an image can be
set using the width and height attributes and assigning them a numeric value which
will denote the height and width of an image in pixels.
Example:
1
Image alignment
Align an image using the align attribute and setting it to "left" for left alignment
or "right" for right alignment.
Example:
<imgsrc="/images/apple.jpg" alt="Apple" align="left" >
<p>Eat fruits every day to get your natural sugars.......</p>
<imgsrc="/images/lettuce.jpg" alt="Lettuce"
align="right" >
<p>Don't forget your vegetables either.......</p>
2
< img > places an inline image in a document
Example: Output
<html>
<head>
<title>Welcome to my photo
gallery</title>
</head>
<body>
<h1>Welcome to my Photo
Gallery</h1>
<img src="church.jpg"
width=250 height=200 border=5>
</body>
</html>