In this video, we're going to talk about linking to page fragments, email links, telephone links and SMS links. fragments allow you to link to a portion of a page or a fragment of a page. Possible uses includes sub navigation, connecting terms to their definitions connecting questions to their answers, link at the very bottom of a page back up to the top of the page. And there are two parts to this. One is the fragment you're linking to. And the other is the link to that fragment fragment is defined by an ID attribute on the HTML element.
So whatever HTML element you want to use, and then the link you use should have a hashtag and then the name of the ID. So if it's like within the page, and the IDS on dead, you can just do hashtag undead back to the index, etc. You can also add it to the end of any URL, assuming the ID exists in the page, the browser will scroll down to where you are. So for instance, if we look here, at probably not actually gonna work because I don't think I have a Id like that on the undead Institute page, but it There were. So that's how you would do linking to a fragment. If we need to link to an email address, we use the anchor tag just like we did before.
But instead of a URL, we use male two colon, and then the email address that we're trying to email. We'll also link to telephone numbers, which is particularly useful on mobile, where you can tap a number and call it. So for instance, in this case, you'd have te l colon, and then the phone number, I believe it does need to be in that particular format of three numbers, dash, three numbers, four numbers. For an American call. Of course, if you are doing International, you probably want to do a plus one and then the rest of the number just like a telephone link, you can also do an SMS link. And it basically works exactly the same except for SMS colon instead of TL.
And it will send a text rather than call. Alright, but let's look at this in code. So here we have the male two and then the zombie killer and undead Institute, your server telephone link of 855. Now, the real fun Number just FYI, here we have the SMS link. And then to demonstrate the fragment what I have is a question here. And in theory, this would be more questions.
And so if I want to click on this, it will take me further down on the page to where the answer is. So it takes me all the way down and there's a little extra space there. But then I can scroll all the way back up and see the page again, if I click it, I will again of course go all the way back down and scrolling back up. Okay, that's it for fragments. Next we're going to talk about multimedia.