Web Development

HTML Hyperlinks

HTML Hyperlinks is the section 6 of Beginner’s Guide to HTML.

Web pages are always full of links. Link to another web site, another web page, another text content, link to a media resource…etc. Likewise we can create millions of links in our web page. Links allow users to click their way from page to page and we describe it as navigation. That’s why World Wide Web (WWW) has become so much popular among people all times. So our hero in this section is Link or we can say it Hyperlink.

We can define a hyperlink in our document using tag. It is called as anchor tag. This anchor can be a word, group of words or an image. When you click it, you will jump upto another place from your web browser. Between the opening tag and closing tag you can put what need to be displayed as the link. A word, group of words, or an image.

So now we are going to create a link here to jump into the Internet Movie Database website.

IMDB Internet Movie Database IMDB Link
Using a word Using a group of words Using an image

Did you see that when you move your mouse onto the link, your cursor becomes a hand. By this, you can identify the text is linked with another content.

Let’s see how it was written.

[code language=”html”]
IMDB

[/code] [code language=”html”]
Internet Movie Database

[/code] [code language=”html”]


[/code]

Attributes of Link

href attribute specifies the destination of the link.

target attribute specifies where to open the linked document. With a link you can go to the specified destination in the link on a new tab of web browser, same page of the web browser etc.

Following example opens the web site in a new browser window or a new tab

[code language=”html”]
IMDB

[/code]

IMDB

id attribute can be used to create a bookmark inside an HTML document. If you can remember in the Attributes in HTML section we learned about the id attribute. So let’s see how the id attribute is useful as a bookmark.

In the IMDB image above I put an id attribute as id=”image_imdb”.  Following link will direct you to the image.

IMDB image
[code language=”html”] IMDB image
[/code]

See how the href attribute value was written. We used # character to refer the id. When creating books in HTML, this concept is very much useful to navigate through chapters and sections. Also when the web page is so long to scroll through, this concept is used to goto top and bottom.


So in this section we learned how to create links. Having links is one way of doing SEO. But do not keep deadlinks on your web page. Reader may be pretty upset about that. In the next section we’ll come with head as we already done with body.

WHAT’S NEXT?

What’s on the HTML Head.

Join Our Newsletter Today

Stay updated with all latest updates.
Give it a try, you can unsubscribe anytime.
Subscribe
SUBSCRIBE NOW

About the author

Sandeep Likhar

Sandeep Likhar from Indore India, Blogger, eBook Designer and Founder of LetsDnD. Having five years of experience in industry as a Digital Publishing Expert and eBook Converter providing services to Authors, Publishers and distributors worldwide. Proficient in converting books into various formats HTML, epub, mobi, word, PDF including all major online platforms iTunes, Kobo, Kindle, Createspace, B&N, Smashwords and more.

Leave a Reply

1 Comment on "HTML Hyperlinks"

Notify of
avatar
Sort by:   newest | oldest | most voted
Annette Concepcion
Guest

It’s hard to find experienced people in this particular subject, however, you seem
like you know what you’re talking about! Thanks

wpDiscuz
DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.

Join Our Newsletter Today

Stay updated with all latest updates.
Give it a try, you can unsubscribe anytime.
Subscribe
SUBSCRIBE NOW