WEBVTT FILE 1 00:00:06.109 --> 00:00:12.300 in this video we're going to learn how to create links using HTML first of all 2 00:00:12.300 --> 00:00:16.970 let's go to our nature article and look for a few links in the first paragraph 3 00:00:16.970 --> 00:00:22.140 so if you look at this one for example let's see the corresponding code to that 4 00:00:22.140 --> 00:00:29.340 link so here is our first paragraph and the link corresponds to this code so we 5 00:00:29.340 --> 00:00:38.399 can see a a open tag and then a close tag so the a tag refers to a link okay 6 00:00:38.399 --> 00:00:42.329 and then between the tags we've called some text which is exactly the text you 7 00:00:42.329 --> 00:00:48.960 can see on the screen and also we've got some attributes to the link so the first 8 00:00:48.960 --> 00:00:54.390 one is an href which tells the browser where the link is going to take us so 9 00:00:54.390 --> 00:00:59.370 the forward slash refers to the root directory of the website which is 10 00:00:59.370 --> 00:01:04.650 wikipedia.org and then we key forward slash is the wiki folder and then 11 00:01:04.650 --> 00:01:10.470 phenomenon is the file we are going to be taken a - if we click on the link and 12 00:01:10.470 --> 00:01:18.780 then the title just shows what shows up when you hover on the link okay so there 13 00:01:18.780 --> 00:01:24.570 are other links on the page so if you go okay if you go to this link for example 14 00:01:24.570 --> 00:01:27.650 it's another type of link and if you click on it it will just take you to a 15 00:01:27.650 --> 00:01:35.040 subsection of the document okay all right so let's go ahead and create a few 16 00:01:35.040 --> 00:01:40.290 links using the these syntax we have learned so we're gonna create a new file 17 00:01:40.290 --> 00:01:45.439 a new file and call it links those HTML let's copy the content from the previous 18 00:01:49.350 --> 00:02:02.540 file and change the title to links okay so we're gonna do we're gonna create 19 00:02:02.750 --> 00:02:06.020 escape the let's keep the heading and keep a 20 00:02:09.270 --> 00:02:19.380 paragraph okay all right so let's place a link inside this paragraph or let's 21 00:02:19.380 --> 00:02:25.620 create a new paragraph let's just create a new paragraph and write some sex in 22 00:02:25.620 --> 00:02:39.140 there so this okay link will take you to the Wikipedia homepage for example so 23 00:02:39.140 --> 00:02:48.810 what we're gonna do we're gonna place the link word inside a tags okay so now 24 00:02:48.810 --> 00:02:54.930 we've got a link there but we need to add some attributes to the link so let's 25 00:02:54.930 --> 00:03:03.810 give it an A to F and we're gonna write HTTP cool on four slash four slash 26 00:03:03.810 --> 00:03:10.610 before we write the address of the Wikipedia homepage okay so 27 00:03:10.610 --> 00:03:13.610 www.engvid.com okay you can also add a title attribute 28 00:03:18.000 --> 00:03:24.209 if you want to call it Wikipedia so now if you hover on the link you can see the 29 00:03:24.209 --> 00:03:28.950 title showing up and also if you click on the link it will take you to the 30 00:03:28.950 --> 00:03:38.959 Wikipedia on page all right so let's create another paragraph okay 31 00:03:40.290 --> 00:03:46.709 let's delete the previous one and just change this first heading to paragraph 32 00:03:46.709 --> 00:04:02.189 one okay so now we're gonna create another heading paragraph two okay and 33 00:04:02.189 --> 00:04:08.769 let's create another paragraph okay and this time let's try some other text so 34 00:04:08.769 --> 00:04:21.099 this link will take you to the paragraph web page of this course so what we're 35 00:04:21.099 --> 00:04:29.320 going to do we want this link to take us to the paragraphs page okay so again 36 00:04:29.320 --> 00:04:38.349 we're gonna place the link word inside a tags and they're gonna give this an H 37 00:04:38.349 --> 00:04:44.560 ref this time the href is going to be the name of our paragraphs at page so 38 00:04:44.560 --> 00:04:50.680 it's going to be three dots paragraphs plus HTML okay we can give it a title if 39 00:04:50.680 --> 00:05:01.210 you want two paragraphs and now we can try that so when you're over there you 40 00:05:01.210 --> 00:05:05.440 can see paragraphs and if you click on it it will take us to the paragraphs 41 00:05:05.440 --> 00:05:14.940 page okay all right now we're going to create another link 42 00:05:18.740 --> 00:05:24.350 that will take us to a subsection of our documents but before we do that let's 43 00:05:24.350 --> 00:05:32.620 create a few more paragraphs okay so I'm going to create another paragraph 44 00:05:32.620 --> 00:05:43.780 paragraph 3 a heading and then a paragraph so let's just try some text 45 00:05:46.570 --> 00:06:03.050 copy-paste it multiple times okay and let's just copy this multiple times okay 46 00:06:03.050 --> 00:06:23.389 so here called paragraph 3 4 6 & 7 ok so now we want a link at the bottom of the 47 00:06:23.389 --> 00:06:37.400 page that will take us to paragraph 1 ok so let's create a link here and let's 48 00:06:37.400 --> 00:06:47.599 write some text inside take me to paragraph 1 so our href this time we'll 49 00:06:47.599 --> 00:06:53.900 need to use an ID that we're going to give to the heading of paragraph 1 so 50 00:06:53.900 --> 00:06:59.389 we're gonna do we're gonna give this first heading an ID and let's call its 51 00:06:59.389 --> 00:07:12.979 paragraph 1 or this p1 okay and our href is gonna be number sign and then the ID 52 00:07:12.979 --> 00:07:19.550 of that heading so now if we click on the link it will take us to the first 53 00:07:19.550 --> 00:07:24.849 paragraph or the first heading ok