From the course: HTML for Educators
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Creating links within pages - HTML Tutorial
From the course: HTML for Educators
Creating links within pages
- [Instructor] Let's learn how to create internal links within a single page or a specific destination of another page. I'm in references.html where I have a list of papers. This list is a bit difficult to navigate around, so let's create internal links to fix that. We know that every link needs two components, a label and a destination. We can use the letters in this list as our labels, but we need to define a location for our links to go to. We do that by setting a unique ID attribute. The ID attributes can be set inside of the opening tag of any element inside of the body section of your code. Let's create an element called a div and wrap it around all of the references for that letter. A div is a generic HTML container used to group other elements together with. Let's come down inside of the definition list tag, and create an opening div, and set its ID to the name that you want your destination to be. I'll type in "a" It's a good idea to keep your IDs short, simple, and easy to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.