URL's

Updated: February 17, 2022
No Credit Card Required
ClaimYour
FreeTrialClass

Transcript

I have two pages for my website now. So I'll need to be able to navigate from the gallery page to the About Me page. The anchors in my header will need a special href value called a relative URL.

You already know about another URL that sends you to a page and another website called an absolute URL. But a relative URL is the location of a page within your website. The relative URL for my gallery is gallery.html. And the relative URL for my About Me page is about-me.html, basically just the name of my files. I'll fill in these href values for my about me and gallery anchors. I'll preview my project to make sure it works.

I'm currently on the gallery page. And if I click the about me link, I'm sent to the About Me page. Great. There's one small problem, the link to the current page still shows up as a clickable link, which doesn't really make sense. I can click the about me link, and the page reloads. Yay, I'm back at the same page. Clearly, this from the anchor on the current page. The link for about me is no longer clickable when I'm on the About Me page.

HTML/CSS AdvancedCoding Exercises, Quizzes and Projects are available at online.ucode.com with your free membership
Loading...