Making Links
Links are extremely useful for bringing the user to another page that may be within your website, or may be another website that you think would be useful to others. You can create a simple link using the following code:
<A HREF="Introduction.Html">Simple Link</A>
There are several different types of links, for local pages, you would use something like the above. For links to other sites, you may use something like the following:
<A HREF="http://aspxcodes.blogspot.com">Click here to go to aspxcodes blogspot</A>
Click here to go to aspxcodes blogspot
There are many different things that you can do besides just simple links, but this is still very useful.
Making Links in new windows
You may occasionally need to open a new window for the user because you may not want them to leave you website
or another reason. Many people these days do not like new windows though, and will just block all new windows. In
fact in many 'top ten website mistakes', people place having new windows within the list. But if you want to make new windows, you can use the following code:
<A HREF="http://aspxcodes.blogspot.com" TARGET="_BLANK">Click me and open in new window</A>
Click me and open in new window
Making Links to email addresses
Many times you may also want to have a link to your email address. To add a link to and you can use the following code:
<A HREF="mailto:mail@gmail.com">E-mail me</A>
Linking to somewhere in the page
You may also have a large page and want to link to different pieces of the webpage. In order to do this, first you must make location to link to. You can do this by using the 'name' attribute on the 'A' element, as can be seen here:
<A NAME="section1">Section One - Downloads</A>
This would create a place to link to called 'section1'. You can link to it by using the following code:
<A HREF="#section1">Go to downloads</A>
or by putting the name of the HTML document, like so:
<A HREF="introduction.html#section1">Go to downloads</A>
No comments:
Post a Comment