programminghead Logo

HTML Tutorial 5

Links in HTML

Links (HyperLinks) are found in nearly all Web-Pages. Links are used to Redirect user to one page to another. Other then Redirecting User Links can be used to Get and Send file, processing files in Background open a new tab ETC.
So in this Tutorial we are going to Learn about LINKS.

Link Tag <a>:

<a> or HTML Element Defines Links inside HTML Documents.
To add Links/Hyper links to a web-page we have to use HTML's <a> Tag for that. Between the starting <a> and closing </a> of Link we have to write our Text,

href Attribute :

HTML href attribute Defines the path/URL for our Link Tag.
for adding path to our Link Tag we have to write href attribute inside Link's Starting tag <a> and inside the Double quotas of href we have to gave our Web-Page's URL or Web-site's URLhref="url".

<a href=""> click here </a>

Local Links :

There is not always the case when you have to redirect your user to a page that's only available on the Internet, there are many cases when you just have to redirect or link a page from your Local Machine (Computer) or a file that available on the same Location/Folder/Directory.
in local web-page cases we can link a page without giving the full path. Just the file name and followed by the file Extension (.html)

  <a href="index.html"> Click me </a>

Empty/same Link

There are Some cases when you Don't want to Redirect user to Another page, or you just want to Link the Current page for some reasons like (Reloading the Same page), You can use Empty link.
You just have to enter # insider the href's double quotas href="#".

  <a href="#"> Click me </a>

This Empty url/# will redirect user to Current Web-page's location. You will find a # sign at the end of the url after clicking on the Empty URL.

  <title>HTML Links</title>
  <a href="home.html"> Local Link </a> <br/>
  <a href=""> Link with full Path </a> <br/>
  <a href="#"> Empty/Current page Link </a> <br/>
  <a> un-click-able Link </a>

Results :

HTML Links Style :

When you creates Links in HTML, you will get a Link output on its Default Blue Color, But using style you can change that.
just target your link by tag (a) or by id (#idname). and inside the Curly add css color Property and gave a Color to your Link Text.

Link Color Style Example :

 color: red;

for Changing Link text's Background color, you have to use CSS background-color property.

Link Background Color Example :

 background-color: yellow;

for Changing Link text's Font Size, you have to use CSS font-size property. This will resize your Link's text
for Changing Link's Font Family, you have to use CSS font-family property. This will change The Default Font of your Link's text
for adding Unrline to Link's text, you have to use CSS text-decoration property. This will change your Link's text default Font.

 font-size: 15px;
 font-family: cursive;
 text-decoration: underline;

for adding a nice Hover Effect on Link's text. we have to use CSS :hover attribute right after the tag name/id. This will only runs the CSS Properties on Mouse Hover.

Link Hover Effect:



Jump to/Bookmark using Links :

Using Links you can jump to any line in the web-page and external also. This will scroll your scrron to targeted text/div/image/para/headline etc.
so you just have to write your Targeted tag's ID after the # sign inside the href="" double quotes.

Targeted Line/para :

  <p id="five"> ParaGraph 5 </p>	

Targeted Line/para :

  <a href="#five"> Goto ParaGraph 5 </a>	

Bookmark/Goto Link Example :

	<title>Bookmark/Goto Link</title>
	<a href="#five">Goto Para 5</a><br/>
	<p>para 1</p>
	<p>para 2</p>
	<p>para 3</p>
	<p>para 4</p>
	<p id="five">para 5</p>
	<p>para 6</p>	


goto Para 5

Para 1

Para 2

Para 3

Para 4

Para 5

Para 6

NOTE : You also can do the Same thing with External Webpages. You just have to write full path of external Webpage before the Hast sign #idname and ID name.

<a href=""> para file on External Web-page </a>	

HTML Link Target Attribute :

When we click on the HTML Links, the linked web-page loads on the same page. but there is Target Attribute who gives us freedom to Perform Different Tasks like . Link opens in new tab. small/Big pop-up etc.

_blank : Opens a new black tab in your Browser to load your Linked Web-Page.

<a href="test.html" target="_blank"> click me </a>	

_self : This is default HTML Link Target, It Opens a your Linked Web-Page in the same Browser Window.

<a href="test.html" target="_self"> click me </a>	

_parent : Opens parent links in a one Browser window inside Different Frames.

<a href="test.html" target="_parent"> click me </a>	

_top : Opens a your Linked Web-Page on the Entire Browser window.

<a href="test.html" target="_top"> click me </a>	

Link Example :

	<title>Bookmark/Goto Link</title>
	<style type="text/css">
			background-color: red;
			text-decoration: underline;
			color: white;
			opacity: 0.5;
	<a href="test.html" target="_blank">new-tab Link</a><br/>
	<a href="test.html" target="_self">Default Link</a><br/>	
	<a href="test.html" target="_top">Top Link</a><br/>
	<a href="#">Empty Link</a><br/>
	<a id="hideLink" href="test.html">Low Opacity on Hover</a>	

Result :


minecraft download mojang
05:25 am

Spot on with this write-up, I actually believe this amazing site needs far more attention. I'll probably be back again to read more, thanks for the info!

02:05 pm

I've been surfing online more than three hours these days, yet I by no means discovered any fascinating article like yours. It's beautiful worth sufficient for me. Personally, if all web owners and bloggers made just right content material as you probably did, the internet will probably be a lot more useful than ever before.

download minecraft for free
12:08 pm

I constantly spent my half an hour to read this webpage's articles every day along with a mug of coffee.

02:44 pm

I am actually grateful to the owner of this web page who has shared this great paragraph at here.

minecraft free
06:06 am

Can I simply say what a comfort to uncover someone who genuinely knows what they are discussing online. You actually know how to bring an issue to light and make it important. More and more people ought to look at this and understand this side of your story. It's surprising you aren't more popular given that you certainly possess the gift.

05:41 am

Good respond in return of this matter with solid arguments and describing all about that.

04:08 am

Thanks , I've recently been looking for information approximately this subject for ages and yours is the greatest I have found out till now. However, what about the conclusion? Are you positive in regards to the supply?

11:00 pm

I have read so many content regarding the blogger lovers but this post is truly a fastidious piece of writing, keep it up.

how to download minecraft free
02:57 am

It's hard to find experienced people for this subject, but you sound like you know what you're talking about! Thanks
10:02 am

Kitap Siparis Almanya Yurdum Kitap

how to download minecraft free
08:46 am

Wonderful web site. Lots of helpful info here. I'm sending it to some pals ans also sharing in delicious. And naturally, thanks in your sweat!

Kĝb Bĝger
12:58 am

Son Kitap Listesi Onl_ne Kitap

minecraft download mojang
10:23 pm

I am no longer sure where you're getting your info, however great topic. I needs to spend some time studying much more or understanding more. Thank you for great information I was looking for this information for my mission.

how to download minecraft
07:02 am

Pretty element of content. I simply stumbled upon your blog and in accession capital to claim that I acquire actually enjoyed account your weblog posts. Any way I will be subscribing to your augment or even I achievement you access constantly quickly.

gamefly free trial
09:44 am

I was recommended this website via my cousin. I'm no longer positive whether or not this post is written by way of him as nobody else recognize such distinct about my trouble. You are wonderful! Thank you!

gamefly free trial
05:57 am

Quality content is the secret to invite the viewers to pay a visit the site, that's what this web page is providing.

02:54 pm

Hello! I could have sworn I've been to this website before but after reading through some of the post I realized it's new to me. Nonetheless, I'm definitely delighted I found it and I'll be book-marking and checking back frequently!

12:33 am

Thanks for any other great post. Where else may just anybody get that type of information in such a perfect method of writing? I've a presentation subsequent week, and I'm on the search for such info.

08:16 pm

I loved as much as you'll receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get bought an nervousness over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you shield this increase.

07:41 pm

Hi there! I'm at work browsing your blog from my new iphone 3gs! Just wanted to say I love reading through your blog and look forward to all your posts! Keep up the outstanding work!

03:25 pm

I'd like to thank you for the efforts you have put in penning this site. I'm hoping to check out the same high-grade blog posts from you later on as well. In truth, your creative writing abilities has encouraged me to get my own website now ; )

05:31 am

I could not refrain from commenting. Perfectly written!
09:05 am

Valuable information. Fortunate me I discovered your website by chance, and I am surprised why this twist of fate didn't took place in advance! I bookmarked it.

01:19 pm

Tremendous things here. I am very glad to see your post. Thanks a lot and I'm looking forward to contact you. Will you kindly drop me a e-mail?

08:45 pm

Yahoo's approach turned oout to be fully backwards.
01:07 pm

En Son C_kan K_taplar 2016 Kitap Listesi
02:12 am

Som Ç_kan Kitaplar Turkce Kitap Satin Al

11:27 am

10 Tl Lik Kitaplar Eski Kitaplar

Pdf Book Download
04:24 am

Popüler Kitaplar 2015 Nt Çok Satanlar

08:13 pm

Uygun Kitap Fiyatlar_ Tüyap Kitap Fuar_ Kitaplar_
03:57 pm

Kitap Kurdu En Cok Satanlar En Çok Okunan Dini Romanlar

Ebook Pdf
10:12 am

Ucuz Kitap Sipari_ Son Kitaplar Ç_kan
01:56 am

Ucuz Kitap Al Kap_da Ödeme Son Dönem Ç_kan Kitaplar
12:43 am

Öne Ç_kan Kitaplar Kitap Kurdu Sitesi
10:14 pm

Kitap Bulma Siteleri 2015 Y_l_nda En Çok Okunan Kitaplar
08:32 pm

Kargo Bedava Kitap Sitesi En Çok Al_nan Kitaplar
07:23 pm

En Son Kitaplar 2015 Kitap Sat__ Ma_azalar_

05:47 pm

Kampanyal_ Kitap Siteleri Kitap Sat_n

03:25 pm

Hepsiburada Kitap Sipari_i Yeni Ç_kan Roman Kitaplar_
01:57 pm

2016 Roman Kitaplar_ Kitap Nereden Al_n_r
11:18 am

Ankara Ucuz Kitap Satan Yerler Türkçe Kitap Oku

10:52 am

Spot on with this write-up, I absolutely believe this website needs a great deal more attention. I'll probably be back again to read more, thanks for the information!

Ebook Pdf
10:00 am

Kitapyurdu Sipari_ Ver En Çok Okunan Romanlar 2016

02:06 am

En Son Ç_kan Kitaplar Listesi K_tap
07:28 pm

En Güzel Kitaplar Ve Fiyatlar_ Kitap Fuar_ndaki Kitaplar
05:54 pm

Kitap Sat_n Al_nacak Siteler Ç_kan En Son Kitaplar

Danske Bĝger
04:06 pm

En Çok Okunan Yeni Kitaplar Kitapsepeti
06:05 pm

En Son Ç_kan Romanlar Kitap Yorum Siteleri

Ebook Pdf
04:35 pm

Tavsiye Edilen Kitaplar 2016 En Çok Satan Türk Kitaplar
01:25 am

En Çok Satanlar Kitap 2015 En Çok Okunan Roman Kitaplar_
03:45 pm

Kitap En Cok Satan En Iyi Kitap Alma Siteleri

10:47 pm

It's in point of fact a nice and helpful piece of information. I'm satisfied that you just shared this useful info with us. Please stay us up to date like this. Thanks for sharing.

07:54 pm

Son Zamanlar_n En Iyi Kitaplar_ 2016 Kitap Satan

03:54 pm

Son Dönem Kitaplar En Güzel Kitap Siteleri

03:55 pm

Informative article, just what I wanted to find.
12:09 am

Kitap Almak Için Güvenilir Siteler Güvenilir Kitap Sat__ Siteleri
03:01 pm

2016 Y_l_ Kitaplar_ En Uygun Kitap Al__veri_ Sitesi

04:27 am

Hi there, its good piece of writing regarding media print, we all knoww media is a fantastic source of information.

canadian viagra without a doctor prescription
07:14 pm

Hey! Would you mmind if I share your blog with my twitter group? There's a lot of people that I think would really appreciate your content. Please let me know. Many thanks

06:56 am

Does your site have a contact page? I'm haaving a tough time locating it but, I'd like to send you an email. I've got some suggestions for your blog yoou might be interested in hearing. Either way, great website and I look forward to seewing it improve over time.

02:21 pm

Online Kitap Indir Kitap Sat_n Almak Için En Iyi Site

11:31 am

Idefix Kitap Gittigidiyor Kitap Al
06:11 pm

Kitap _ipari_ Verme Çok Okunan Kitaplar 2015
02:49 pm

Haftan_n En Çok Okunan Kitaplar_ En Çok Okunan Roman Kitaplar_

12:12 pm

Kitap Fuar_ Indirimleri Nt De Sat_lan Kitaplar

12:48 pm

2015 En Cok Satan Kitaplar Son Güncel Kitaplar

11:18 am

En Uygun Kitap Sat__ Sitesi Wwwkitap

01:46 am

Internetten Kitap Sipari_i Nas_l Verilir Yeni Popüler Kitaplar

03:40 pm

En Çok Satan Kitaplar En Iyi Türk Kitaplar_ 2016
02:39 pm

Öne Ç_kan Kitaplar Kargo Ile Kitap Sipari_i
11:33 pm

Online Ücretsiz Kitap Oku Son Yaz_lan Kitaplar
04:37 am

Roman Kitap Isimleri En Büyük Kitap

08:23 pm

Have you ever considered about adding a little bit more than just your articles? I mean, what you say is fundamental and all. But think of if you added some great pictures or video clips to give your posts more, "pop"! Your content is excellent but with images and videos, this blog could undeniably be one of the best in its field. Amazing blog!


Thanks. I will Work on That. Thank for your Kind Comment :)

08:04 pm

Heya! I'm at work surfing around your blog from my new apple iphone! Just wanted to say I love reading your blog and look forward to alll your posts! Carry on the great work!


Thanks. And Congratulations for your New I-Phone :)

08:04 pm

It's an awesome piece of writing in fafor of all the internet viewers; they will get benefit from it I am sure.


Thanks for this Kind Comment :)

11:50 pm

I've been surfing on-line more than three hours lately, but I by no means found any attention-grabbing article like yours. It is pretty price enough for me. In my view, if all web owners and bloggers made good content as you probably did, the internet can be a lot more helpful than ever before.


Thanks. We are Glad to HELP you. Thanks for This Kind Comment.

Write to Us