Linking to Webpages using HTML
As a blogger, you'll probably do all kinds of reading and researching for your own articles. I highly recommend you specifically read other people's blogs. When reading other blogs, you;'ll probably want to comment on their articles - its part of what make blogs so great. You might also come across an article you want to tell your own readers about. This is where links come in.
Hyperlinks - or just links - are what make the Internet what it is: an interconnected canvas of sites and things that bounce people around from one website to another. When used properly, linking can add huge value to your posts, by letting readers find more information, linking to further details, pointing out other things they might link, or sending them to another related webpage on your own website.
Atrributes and Value tags go along with a basic tag, like an . Attributes add on an extra behavior or modifier, and the value sets those variabes. One popular Attributre for <a> is HREF, and it indicates to a browser that what comes next is a hypertext reference - a fancy way of saying a webpage. The value of the HREF is the webpage you want to link to, enclosed in quotation marks.
When this code is posted on a blog, the word 'Computer Hope' becomes a clickable link that goes to 'hope.html'.
IMPORTANT: The above is a simple example. Always use the full URL when you create a link. That means making sure you include the 'http://www' prefix, or else a browser will not understand that it needs to find a website, but will instead look for a page on your website.
Its also very important to note that the example has a closing tag. When you close the tag, you only need to indluce the main tag, not any attributes or values. Those are turned off automatifcally, as they are considered part of the tag.
You can also use an image inside of this tag instead of text - as in, you can make an image a link as well as text. To do so, simply wrap the linking tag around any image go, like this:
If you liked this article, then please subscribe to our YouTube Channel for our Blogger and WordPress video tutorials. You can also find us on Facebook, Twitter and Google+.
/READ MORE// Coding with Style
Hyperlinks - or just links - are what make the Internet what it is: an interconnected canvas of sites and things that bounce people around from one website to another. When used properly, linking can add huge value to your posts, by letting readers find more information, linking to further details, pointing out other things they might link, or sending them to another related webpage on your own website.
In HTML, links are defined using the tag, which stands for 'anchor'. tags are special, however, because they include something called 'attributes' and 'values'. And this is where HTML (and coding in general) get interesting.
Atrributes and Value tags go along with a basic tag, like an . Attributes add on an extra behavior or modifier, and the value sets those variabes. One popular Attributre for <a> is HREF, and it indicates to a browser that what comes next is a hypertext reference - a fancy way of saying a webpage. The value of the HREF is the webpage you want to link to, enclosed in quotation marks.
This is an example:
When this code is posted on a blog, the word 'Computer Hope' becomes a clickable link that goes to 'hope.html'.
IMPORTANT: The above is a simple example. Always use the full URL when you create a link. That means making sure you include the 'http://www' prefix, or else a browser will not understand that it needs to find a website, but will instead look for a page on your website.
Its also very important to note that the example has a closing tag. When you close the tag, you only need to indluce the main tag, not any attributes or values. Those are turned off automatifcally, as they are considered part of the tag.
You can also use an image inside of this tag instead of text - as in, you can make an image a link as well as text. To do so, simply wrap the linking tag around any image go, like this:
Check out some of our other articles about putting images into blog posts here
No comments