Web Templates
Web Templates  
Design Tutorials  
Link to Us  
Templates Resource - Web Templates
 
 
 

  Sign UpPassword
Templates Resource Services Support Specials Members View Cart
 
  Photoshop Tutorials
  HTML Tutorials
  ASP Tutorials
  CSS Tutorials
  Javascript Tutorials
  PHP Tutorials
  XML Tutorials
  Flash Tutorials
  Fireworks Tutorials
  3D Studio Max Tutorials
  Cinema 4d Tutorials
  Graphics
  Website Tools
  Web Templates
  About Templates Resource
  Affiliates Program
  TR Support
  Webmaster Resources
 Columbia Tech Support

WebDesignHelper.co.uk


HTML Tutorials: Links

Links are a most necessary part of any site navigation. Here I'll show you all the coding for them.

The basic formula for a link is:

<a href="page.html">Your Link</a>


This produces:

Your Link

When you click on this link, it takes you to "page.html".) Pretty easy, eh. Like all parts of web design, there are always ways to spice things up.

Sometimes you may want a link to display a page in a new browser window, or one that is already open. To do that, you need to add the target attribute to your anchor tag (that's what the A stands for, if you were wondering). In the target attribute, you need to define the name of the browser window you want the link to open in. The code looks like this:

<a href="page.html" target="_new">Your Link</a>


This will open up a new browser window named "_new". The underscore character is used for certain predefined locations and is generally a good idea to put in as the first character of your target name. The target "_top" is one such special case. It will tell the link to open up in the entirety of the current browser. For instance, if a link with the attribute target="_top" was found inside a frame or iframe, the link would open up the referenced web page not in its frame/iframe (which is the default), but in the full open browser.

The other import aspect of creating links is changing their color and style. The old way to do this is by making changes to the <body> tag that is included near the top of HTML code. The 3 attributes to change are link, alink, and vlink. Link changes the color of links on your page, vlink changes the color of visited links, and alink changes the color active links (the moment you click a link). You can use color names or hexadecimal codes like the following:

<body link="navy" alink="FF6600" vlink="blue">


The other way to change the appearance of links is by using style sheets. That is how the links on Spoono are controlled. The easiest way is to add the style sheet within the <head> tag area of your code. The typical format is like this:

<style type="text/css">
<!--
A:link { color: #FF0000; text-decoration: underline; }
A:active { color: #3388FF; text-decoration: none; }
A:visited { color: #999900; text-decoration: underline; }
A:hover { color: #007700; text-decoration: none; }
-->
</style>


This makes links appear as follows:

Your Link

As you can see the attributes for the style sheets work the same way as the body attributes do, with the addition of A.hover. This attribute changes the color of the link when the mouse is hovering over it. Also, the text-decoration attributes control the style of the links. The options are: underline, overline, line-through, blink, and none.

Perhaps the slickest way to customize links is to store the style sheet in an external file. This is what we do at Spoono. To do this, copy all the actual code of the style sheet like this:

A:link { color: #FF0000; text-decoration: underline; }
A:active { color: #3388FF; text-decoration: none; }
A:visited { color: #999900; text-decoration: underline; }
A:hover { color: #007700; text-decoration: none; }


and paste it into a text file. Next, save your file with a .css extension. Finally insert the following code within the <head> tag area of your HTML:

<link rel="stylesheet" type="text/css" href="your_file.css">


That's it. Let the linking begin!

 

 
Tutorials: HTML

Level

 

HTML Tutorials


Step By Step
Beginner to Advanced

 

HTML Tutorial
A step by step tutorial on HTML starting with the basics including common tags, fonts, text, links, images, and lists.
The advanced portion of this tutorials covers popular items such as forms, tables, frames, counters, guestbooks and more.


Beginner

 

Backgrounds: Tutorial
Learn how to effectively add backgrounds to your page that make your page look professional or amateur.


Intermediate

 

Imagemaps: Tutorial
Make one image into various clickable regions using only HTML


Advanced

 

Embedding Fonts: Tutorial
Learn how to use uncommon fonts in web pages by embedding them.


Intermediate

 

Images: Tutorial
Positioning images can make your images look just right when inserted into text.


Intermediate

 

Form Effects: Tutorial
Learn how to create trendy forms with simple style commands as well as with CSS classes.


Advanced

 

Layers: Tutorial
Layers can make complicated image placement possible.


Advanced

 

Forms: Tutorial
Use forms to gather information from your users.


Beginner

 

Links: Tutorial
Making links in HTML is the easiest thing you will ever do.


Advanced

 

Frames: Tutorial
Learn how to create frames that enable you to create navigation systems on your site.


Advanced

 

Scrollbars: Tutorial
Learn how to add effects to your scrollbars and add flavor to your page.


Intermediate

 

Hide From Print: Tutorial
Learn how to only allow a visitor to print part of your page using CSS.


Advanced

 

SSI: Tutorial
Learning how to do SSI will save you a lot of authoring time.


Beginner

 

Horizontal Line: Tutorial
The horizontal line serves as a great separator tool.


Intermediate

 

Table Styles: Tutorial
Learn how to add various table styles such as dash or dot borders, and many other things.


Advanced

 

Iframes: Tutorial
Iframes can organize your website into clean sections.


Intermediate

 

Tables: Tutorial
Organize your web page layouts with tables.


Beginner

 

216 Web Safe Color Chart: Tutorial
The 216-color color-safe palette refers to colors (RGB values) that will appear the same on either IE or Netscape and Windows or Mac platforms.


Intermediate

 

Pantone RGB/Hex/HTML Colors: Tutorial
This table contains all pantone colors converted to RGB and Hex. It displays them all in HTML colors.

More Tutorials

Templates Resource FAQ Services Terms of Use Site Map Support View Cart

© Copyright 2003-2007 Templates Resource