Pages

Useful Things in HTML (Lesson 3)

How to add Images and Hyperlink to your website


     Hello reader, welcome to Useful Things in HTML Lesson 3. Before you read this, if you doesn't have any basic knowledge about HTML, then read LESSON 1 and LESSON 2.

     Most of webpages have Images and Hyperlinks. Actually without Images and Hyperlinks, it is difficult to create successful/ attractive website / webpage. Hence, today my tutorial is about How to add Images and Hyperlinks to your website


     Lets take a look how to add images to your website first. We use following tag to add images to website,


< img src = "<path>" />

     Attributes we use with < img > tag.


Tag Description
align Use to adjust alignment of Image
border Specified the width of the border around an image
width Specified WIDTH of the image
height Specified HEIGHT of the image
hspace Specified "whitespace" on top and bottom of images

     Now we know < img > tag and its attributes, Now lets try to write simple HTML code using < img > tag.

<html>
<head> </head>
<body>

   <img src="https://upload.wikimedia.org/wikipedia/commons/6/6a/Mona_Lisa.jpg" width="400" height="600" align="center" border="1" />

<br/>
<p align="center"> <i>Mona Lisa by Leonardo da vinci</i></p>

</body>


      Now we already learn how to add image to your website. In second topic we are going to discuss how to add Hyperlink to your website.

    We use following tag to add hyperlink to website,


< a href = "<path>" > Your Text < /a >

Example

< html >
< head> < /head >
< body >
   
   Visit  < a href="https://www.google.lk" >  To GOOGLE  < /a >

< / body >
< /html >