Hello guys!! Welcome to flower brackets. In this post we are going to learn external links in html.
Here we will be discussing on external links and you know the internet won’t have been what it is if we did not have feature of including links in our websites.
The fact that there are so many websites on the internet and they all have links to one another makes the internet or web actually.
Right, so it is very easy in html to include links in web pages. We are going to see how we can do that.
Example : learn external links in html
Over here I have an html document,
<!DOCTYPE html> <html> <head> <title>Learn External Links In Html</title> </head> <body> <p> <a href = "https://www.flowerbrackets.com">Flower Brackets</a> </p> </body> </html>
In the body section I have a paragraph and the paragraph just has the text “Flower Brackets”.
What I have done is, I have included text “Flower Brackets” and for this text I have a link.
If you would click on the text you would be redirected to you know flower brackets website.
Also Read – Learn Inserting Images In Html
And the tag I have used to create a hyperlink of the above text is the anchor tag or the “<a>” tag.
That’s what is called and it is more popularly known as the anchor tag. And then there is an attribute of this tag which is very important.
It is called “href” and you have to set the value of this attribute to the URL to which you want the link to take you.
So you know in this case since I want to be redirected to “https://www.flowerbrackets.com”.
You also have to type in HTTP colon and two slashes. So if you just type in “www.flowerbrackets.com” let’s say for instance.
Then you won’t be taken to “flower brackets”. We will get an error. So you need to have the entire URL here.
To close the tag I have just typed in slash (/a) “a” at the end of the text.
I will save the file and open it in my web browser.
And this is how it looks in google chrome. You can see that the text “Flower Brackets” although I have just used the paragraph tags for it.
It is in simple text if I would you know take the pointer over it I would see type of pointer being changed to the hand which is an indication of the fact that it is a link.
If I would click on it then i would be taken to the website “www.flowerbrackets.com”. As you can see in the URL bar.
Anyway that’s you know the anchor tag. It’s a very brief introduction of the anchor tag actually and will be checking out more attributes more values that you can assign to the “href” attribute in the coming posts.