1 00:00:00,390 --> 00:00:04,720 Have you ever visited a site or app where you clicked an email address and 2 00:00:04,720 --> 00:00:08,610 it auto-launched your default email program with the subject, 3 00:00:08,610 --> 00:00:11,290 to and from address fields already filled out. 4 00:00:11,290 --> 00:00:15,040 It let you begin composing an email without first having to copy or 5 00:00:15,040 --> 00:00:17,320 enter an email address into the email client. 6 00:00:17,320 --> 00:00:20,130 Well, that functionality was created with just a link. 7 00:00:20,130 --> 00:00:22,820 No fancy scripting or programming necessary. 8 00:00:22,820 --> 00:00:23,340 Let me show you. 9 00:00:24,460 --> 00:00:27,850 So, first, back in index.html, 10 00:00:27,850 --> 00:00:33,220 I'll place the email address and the contact section inside tags. 11 00:00:37,180 --> 00:00:42,210 So to open the default mail program with the link, you begin the email 12 00:00:42,210 --> 00:00:47,038 links href value with mailto: 13 00:00:47,038 --> 00:00:51,510 followed by the email address you want the email to be sent to. 14 00:00:51,510 --> 00:00:54,470 In this case it's coolvrexperience@gmail.com. 15 00:00:54,470 --> 00:00:59,330 So I'll go ahead and copy it and paste it right after mailto. 16 00:00:59,330 --> 00:01:04,220 These types of links are often called mailto links because the mailto 17 00:01:04,220 --> 00:01:09,520 command inside the href attribute is what allows users to send an email 18 00:01:09,520 --> 00:01:11,380 to the specified address. 19 00:01:11,380 --> 00:01:16,850 So click to Preview the page, and scroll down, to the Contact email link. 20 00:01:17,870 --> 00:01:21,720 And that's it, clicking on the link starts up my default email program, and 21 00:01:21,720 --> 00:01:25,610 includes the email address, coolvrexperience@gmail.com, 22 00:01:25,610 --> 00:01:26,640 in the To field. 23 00:01:27,750 --> 00:01:31,950 And you're also able to open the mail program with the Subject field filled out. 24 00:01:33,570 --> 00:01:38,700 To provide a default subject, you add a question mark right after 25 00:01:38,700 --> 00:01:42,950 the email address followed by the subject parameter, 26 00:01:42,950 --> 00:01:46,800 an equals sign, and the subject you want to display. 27 00:01:46,800 --> 00:01:48,350 Let's display, hi, there. 28 00:01:50,820 --> 00:01:55,970 Now, most modern email programs will include the space and 29 00:01:55,970 --> 00:01:57,880 the subject field by default. 30 00:01:57,880 --> 00:02:02,783 But it's good practice to define each space in a subject 31 00:02:02,783 --> 00:02:05,612 value using percent sign 20. 32 00:02:05,612 --> 00:02:09,881 This is a special character code known as percent in coding or 33 00:02:09,881 --> 00:02:13,410 URL in coding, for explicitly defining spaces. 34 00:02:13,410 --> 00:02:14,680 So let's give this a save. 35 00:02:15,980 --> 00:02:20,450 Refresh the browser, click on the Email, and 36 00:02:20,450 --> 00:02:22,620 we see, Hi There, as the email subject. 37 00:02:22,620 --> 00:02:27,075 Go ahead and check out the teacher's notes to learn more about parameters and 38 00:02:27,075 --> 00:02:28,662 values from mailto links.