A link is one of the most important things in HTML. It ties the content together and, well, links it. It can come in multiple forms, the two we'll be looking at is in
blue text (it's changeable!) and inside a picture.
So lets get to it.
We've all seen text links before, unless you've been using the computer for less than 10 seconds They are normally a
blue color and are
underlined. Here is an example of a text link:
http://www.example.com
*The HTTP stands for
Hyper
Text
Transfer
Protocol,
*WWW stands for
World
Wide
Web
*
Example is the site's title
*
Com stands for Commercial (there's also .org (organization), .net (network), etc.)
--So it looks pretty here on this page, doesn't it? Neat and clean!
--But, under the hood, it's a bit uglier.
Here is what you would have to put in an html document to show a link:
<A href="http://www.example.com">http://www.example.com</A>
--Don't fret, we'll go over what is going on here now.
Href stands for [h]ypertext [ref]erence
That tells the browser that the text (link) is clickable.
The Red text is the URL itself, for example this blog's url is
http://www.weblayers.blogspot.com.
The Green text is what is shown to humans, and it's changable.
So if I wanted to make a URL to my blog, but wanted to change the text, it would
look like this:
<a href="http://www.weblayers.blogspot.com">I'm a link!</a>
=>
I'm a link!
So now you know a little about text links. Lets get into image links!
Here's an example of a image with a link:
If you click that it goes to http://www.example.com, and if you right-click you can copy the link location (http://www.example.com). The link is embed!
But how does it look behind the layers of the web?
<a href="http://www.example.com/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img height="200" src="
http://tinyurl.com/3vmzr6k" width="200" /> </a></div>
http://tinyurl.com/3vmzr6k is a substitution for the location of the image, such as example.png, through the website tinyurl.com
That is even worse looking!
So again, we see the <a href="http://www.example.com/". That is the same, linking you to the other page. The rest of this is all for the look of the image, just as we changed the look of the text.
style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;">
--This is all positioning of the image, in the CSS language.
img height="200", width="200"
--These are the dimensions of the image, if you in increase the variables then the image size will increase, and vice versa
So there is a look into Links, a very important part of web design. Stay tuned for more web design tutorials!