How a link works

I received a request to explain the workings behind the "cut & paste instant link" on the main page, so I will do that here.  First a quick explanation, when you are working with HTML at the most basic level, you are typing text that will be displayed by a web browser.  When you want something other than plain text to appear on the page, you put a command in arrow brackets.  When the web browser displays the page and sees a command in arrow brackets, it knows to make something happen.  Some commands are a one time thing, for example <hr> is the command that tells the browser to draw a straight line across the screen (a horizontal rule).  Most command have to be turned on and off, on by putting the command in arrow brackets, off by typing the same command with a / in front of it, like this:

<command>
Text to be changed by the command</command>

Here is the link format from the main page (I changed the colors for this explanation)

 <a href="http://www.URL.com" target="_blank">ClickMe</a>

Ok, what does all of that really mean?  First is the parts in blue:
 <a href="http://www.URL.com" target="_blank">ClickMe</a>  
The command here is a , which stands for anchor.  This anchor command can do other stuff, but of most importance to us is that you have to use this command to post a link.  Notice it is turned on at the beginning with <a> and off at the end with </a>.  The extra stuff in grey is part of the link which is explained below.

<a href="http://www.URL.com" target="_blank">ClickMe</a>

href= tells the browser that this is going to be a hypertext reference, a link to something.  The "something" has to be enclosed in quotes, as shown.

 <a href="http://www.URL.com" target="_blank">ClickMe</a>

This is the "something", the address of the link you want to post.  The easiest way to get it is to copy and paste it from the address line of your browser. 

 <a href="http://www.URL.com" target="_blank">ClickMe</a>

 target="_blank" tells the web browser to open this link in a new window, so the person doesn't lose there place or get logged out of CF.

 <a href="http://www.URL.com" target="_blank">ClickMe</a>

Finally, this is the text that is marked as a link, the actual words that the user sees and can click on.  You can type as much or as little as you want, as long as it comes before the closing </a> command.  That's it, one link broken down into parts.

One other quick explanation, HTML stand for HyperText Markup Language. The HTTP in a web address stands for HyperText Transfer Protocol.  When your make links (like above) you are actually coding in HTML.  When a browser displays a web page, it is transferring that HTML coding to the users screen.

 

-JB

 

 

 

 

 

 

 

Hosted by www.Geocities.ws

1