HTML Tutorial
How do I create links on my site?
Links are easy to create on a site. The HTML tag looks something like this:
Visit AIHOST
This is what the HTML tags look like...
Visit <a href="http://www.aihost.net" target="_blank">AIHOST</a> Attributes:
href="" is the path where the link is going. If you want to open an email, this
is where you will declare the email address, to do so type: mailto: insert email
address inside href="". Example: <a href="mailto: sales@aihost.net">sales@aihost.net</a>
target="" where to open the target URL. Attributes:
- _blank the target URL will open in a new window.
- _parent the target URL will open in the parent frameset.
- _self the target URL will open in the same frame as it was clicked, you could
also remove the target attribute to do the same.
- _top the target URL will open in the full body of the window.
name="" anchor tag - Names an anchor. Use this attribute to create a
bookmark in a document.
shape="" circle, rect, poly - Defines the type of region to be defined for mapping
in the current area tag. Used with the coords attribute.
coords="" coordinates - Specifies the coordinates appropriate to the shape
attribute to define a region of an image for image maps.
If shape="rect" then:
coords="left, top, right, bottom"
if shape="circ" then:
coords="centerx, centery, radius"
if shape="poly" then:
coords="x1,y1,x2,y2,..,xn,yn"
tabindex="" value, -1 automatically goes to the first one.
Note: The "a" then a space href=" " That is where you define the URL of where
you want the link to go. That is an example of what is called "hard
referencing." Hard vs. soft referencing will be explained next in this
tutorial.
What is hard vs. soft referencing?
Hard referencing is a link on your site that uses the complete URL to get to the
destination that you wish. Soft referencing is a link that is telling the
browser that the page in question is on the same server, and is in a respective
directory (if specified). Here are examples of both hard and soft referencing.
Hard Referencing:
<a href="http://aihost.net/index.html" target="_blank">AIHOST</a>
Soft Referencing:
(Note the / to indicate to the
browser/server to go up a directory to find the web page)
<a href="/index.html" target="_blank">AIHOST</a>
Soft referencing has many advantages. If you are linking to a page on your
server, in a directory that is the same or one step above or below the directory
where the HTML page lies, use soft referencing because the page will load faster
because it doesn't have to find the DNS (domain name server) location again.
Basically this means that it loads faster due to the fact that the HTML page you
are linking to is very close in terms of the server.