HTML MADE EASY
Web Design for Beginners

Lesson 6: Links

Putting It All Together

Links, this is what the web is all about and it’s simple to do with anchor tags:

<a></a>

The anchor tag comes with the href attribute. This attribute tells
the browser where to find a link. A link to a web page within the same directory (folder) of the
website would look like this:

<a href="filename.html">here goes text to be clicked</a>

The href attribute contains the file name of the destination web page. The file name is enclosed
in quotation marks and it includes the html extension. The text between the opening and closing
a tag is the link people will click.

To keep things simple, for now place all your web pages in the
same folder (directory).

How To Link To Another Website

When linking to another website the entire address (url) of the website is put into the href
attribute:

<a href="http://www.siteaddress.com">text to be clicked here</a>

Be sure that http:// is included in the website address.

How To Link With Picture

An image becomes a link when the img tag is enclosed in the opening and closing a tags:

<a href="filename.html"><img src="filename.jpg"></a>

Replace filename.html with the file name of the web page or website address, and replace
filename.jpg with the file name of your picture.

In some browsers image links have a blue border
around them, the border can be removed by adding to the img tag the style attribute with a CSS border
command:

<img src="filename.jpg"style="border:0;">

Email Link

Putting an email link on web pages is done by entering the email address in the href attribute
preceded by a mailto: command like so:

<a href="mailto:me@email.com">here goes what people click</a>

Notice there is a colon between mailto and the email address and that they are enclosed in quotation marks.

And that's how to make links, next we're going to make a list in lesson 7.

DID YOU KNOW...?
You can register a website address (called a domain in tech talk) even before you have a website.
In fact the longer you wait the more difficult it will be to get one that isn't already taken.
More Info

DID YOU KNOW...?
There is more to building a website than just making it. It also needs
web hosting so that it can be seen on the internet.
More Info

Easy Website Builder
Skip the tutorial and build your website or online store without learning any code
Tell Me More