We all can create a HTML page , right ? But What If I want to connect two HTML pages ? Good question.. Don't Worry ,We will discuss about it now .So please take a seat . Let's start .
So , when we want to connect two pages then <a> tag comes in picture.Through this tag we can connect between two HTML document (pages) ,we also can connect an external image and also we can put any website's link.Well ,but where to put the links and also what is <a> tag .
Well , <a> tag is nothing but an element is called anchor element .And it has a attribute is "href (hyper reference)" where we can put the address or the link that where we want to go or we connect with that particular page .
But how ..... That I will show you too ..
Suppose , we have two pages in a website , is "HOME" and "CONTACT" . So I am gonna show the linking process below with an example :
So , in the above example , we can see two pages are linked with each other through anchor (<a>) tag.Where href is containing the page's address or we can say as path .Let's see output below :
So now connections build-ed between two page . That's little nice.Although we can attach or connect an external image in anchor (<a>) tag , just we have to give path off that image and also image name in href attribute . Let's see an example below :
In the above example, href attribute is containing the path where the image staying and the image name .And when we click on hyperlink Coffee , it will drag us to same page and then image will be show .. So in this case image will be open in same page. But if we want to open image in the different tab , the we have to use a attribute called target , which value will be "_blank". So target = "_blank" .. Output of the above example shown below :
So as we can see a cup of coffee ,wow , Mammaamiaa and nice trick .. Well we know now how to add or connect an external image through <a> tag and also connection between two HTML pages .So , practice hard .
Please visit my YouTube Channel link given below :
Please follow my Facebook page link given below :
Keep Learning :)
Thank You .
Comments
Post a Comment