Understanding HTML links

Where would this hyperlink take me…


<a href="finance/">Finance</a>

And what is the difference with this link…


<a href="/finance/">Finance</a>

Thanks,

Debbie

Answered in bold, hope this helps :slight_smile:

Well, what Dan said is pretty true of paths on a Linux system, but whether your links begin (or end) with a slash is also part of how your server is set up.

For example our local fire department site, when it was running Perl’s Dancer framework (which uses routes in the way many microframeworks do), all links started with a slash. It had to do with how the routes in the config file was set up more than anything. Your particular server might also have special rules for slashes. The trailing slash in Apache at its default setup for example. There’s a directive in Apache that says whether it should expect a trailing slash or not.