HTML Links

Links

HTML Links
HTML Links

Putting It All Together

Link 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 (href means hyperlink) attribute. It means “hpertext reference”. This attribute tells the browser that where to find a link. A link to a web page within the same directory or 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 text which is given in the hyperlink has the destination link so when the user clicks on that text, he/she will redirect to 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, web master should place all the web pages in the same folder (directory).
Linking to another website is done by putting the entire website address (url) 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. For turning an image into a link is done by surrounding the img tag with the opening and closing a tags:
<a href="filename.html"><img src="filename.jpg"></a>
Replace filename.html with the file name of the page or website address, and replace filename.jpg with the file name of your picture which you want to show on the page.
By default image links have a blue border around them, the border can be removed by adding the style attribute with a CSS border command:
<img src="filename.jpg" style="border:0;">

Learn HTML Links:



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:waterart.bizland.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. By the way, in case you haven’t noticed by now, there is a space between the a and the href attribute.

For More Information You can visit: w3schools


Previous
Next Post »