How It Works
Links between pages are likely one of the most important elements in a web page, because they enable
you to create a connection between a page in your site and another page, whether that page lives in
your own site or on a completely different server somewhere on the Internet. For simple links that
should appear somewhere in your page, the HTML tag with an href attribute set is the easiest to
set up. When the user clicks such a link, the browser requests the new page from the server and displays
it. The double dots (..) in the href’s value are a way to refer to the parent directory. The full href
attribute means “go up one level in the folder hierarchy and then select the file Default.aspx.” You see
a lot more about links and how they work in Chapter 7.
You’re not limited to linking to pages in your own site. If you want to link to external pages instead,
simply replace the href attribute value with the full address of the page, as shown in the following
example:
Go to the Wrox homepage
For external links, it’s important to include the http:// prefi x; otherwise, the browser goes out looking
for a fi le or folder called www.wrox.com on your own website.