From the course: HTML and CSS: Linking

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Linking within the same document and top of page

Linking within the same document and top of page

From the course: HTML and CSS: Linking

Start my 1-month free trial

Linking within the same document and top of page

- [Instructor] Sometimes, you'll want to link within a document. There are many reasons to do this. If this is a long document, you may want to link further down on the page. You may also want to link from the bottom of the page back to top of the document. So, how do we go about setting that up? Well, there's two halves to linking within a document. One half is the link itself, of course, and the other half is an indicator of where that link should go when the link is actually clicked. So let's walk through a simple example with a back to top link, which is a very common way that we see linking within a page implemented. So we're going to start by putting in our link. And if you scroll all the way down this document, I put in a lot of blah, blah here, it's a long article. And where we're going to put this in is here on line 61 where it says, back to top. So it's going to be, once again, an a href I know you didn't see that coming. Something is going to have to go there and we'll end…

Contents