<link>

PURPOSE: To link an external css or javascript file. Also the link for a Favicon icon to show up in internet explorer.

This is one of those tags that is different. There is NOT a </link> tag. It is all incorporated into the one tag. Note there is a space after the end of the text and the /.

Below is a basic html document. The referenced html tag is in RED. All tags must have a start and a end tag. Most end tags have a / before the tags name, however there are a few that are done differently. The tags that end differently will be noted and highlighted. The order of the start and end tags is also very important to proper display of your page in a web browser.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> The Page Title Goes Here </title>
<link rel="javascript" type="text/javascript" href="myscript.js" />
This link tag will call a external javascript file and embed it in this html page. It keeps you from having to add the same javascript in each page. You can just link to it from each page instead of having to write it over and over.
<link rel="stylesheet" type="text/css" href="mystyle.css" />
This link tag will call a external style sheet and embed it in this html page. It allows you to use one style sheet to control all your web pages.
<link rel="shortcut icon" href="the page url/favicon.ico" />
This link only works for Internet Explorer. It puts the little custom icon 16 pixels x 16 pixels (a favicon) you see on some sites in the address bar in place of the generic Internet Explorer image. It will also display in your favorites menu when you bookmark the page.
</head>
<body>
</body>
</html>


© Copyright 2001,2002 Southern Twilight    All rights reserved.

Back To HTML Examples