Home : Basic HTML/CSS tutorial : More HTML basics : Summary
< Previous: Links


Attributes provide information for some tags

Attributes and their values provide extra information where a particular HTML tag needs it. For example, the link tag, <a>, needs the href attribute to specify where the link should go to.

Links are created using the <a> tag

The <a> tag is used to create links. The text or other content contained between the open and close tags becomes active; when clicked, it sends the user's Web browser to the URL specified by the value of the href attribute.

URLs can be absolute or relative

URLs can be either absolute - full URLs beginning with http:// - or relative, in which case their destination is based on the location of the page containing the link.

Links within a Web site should normally be relative URLs, because this means they will work when the page is stored on hard disk as well as when it is at the server, and they will not need altering if a Web site is moved to a different server.