Monday 13 February 2017

HTML LESSON - 3

 

THIRD LESSON OF HTML

<!DOCTYPE html>
<html>
<head>
<title>Third Lesson of HTML</title>
</head>
<body>
<h1>How to add image in webpage?</h1>
<p>Images in HTML can be used with the [ img ] tag. </p>
For example:
<img src="background.jpg" alt="www.google.com" width="100px" height="120px">

<p> In the above code, src is the source from where image is taken, alt is alternate source i.e. if your main image is not found or may not visible for any reason , then this alternate text will be appear. Width and Height decides the size of this image.
</p>
</body>
</html>




Now, Few Key points to remember always:


  • Always remember to define the image type extension like .jpg, .png, .gif etc.
  • Image size should always be greater than or equal to your required area size, where you use image. As, smaller image will be blurred or not visible properly.

0 comments:

Post a Comment