Specifying a base URL


show more Specifying a base URL provides you with in-depth training on Developer. Taught by Bill Weinman as part of the XHTML and HTML Essential Training show less
please wait ...

Specifying a base URL

So, in our last lesson, we learned about relative URLs and in this lesson we're going to talk about how you can change the base of the relative URL. In other words, we learned that relative URLs are relative to the location of the document that has a link in it. But you can actually change that by using the base tag. The base tag goes in the head section and here is the base tag here and all this does is it specifies a location that all the URLs in this document are going to be relative to and again this file is available on my web server.

I'm actually using a local copy of it, because it can illustrate the same point. You'll notice in the browser here that this file is on my local machine at a file URL. Yet when I hover my mouse over this link, you'll see at that bottom. It's a link on the server and yet if you look at it in the text editor that this link, it doesn't have that whole http part of it. That's in the base and so it takes this and it uses this a...

Specifying a base URL
Video duration: 2m 4s 4h 44m Beginner

Viewers:

Specifying a base URL provides you with in-depth training on Developer. Taught by Bill Weinman as part of the XHTML and HTML Essential Training

Subjects:
Developer Web
Software:
HTML XHTML
Author:
please wait ...