Saturday

Helpful HTML Codes



How can I do more with links?

The HTML for a basic link looks like this:

a href="http://URL">TEXT

With this code, someone looking at your webpage will
see the word or words
you have as the TEXT. This text
will be highlighted, and when clicked on,
the browser
window will go to the address specificed by the URL.


You can also create a link that people can use to email
you. In the example
above, just replace the
http:// with mailto: and use your email address in

place of the URL. It would looks something like this:

a href="mailto:myaddress@example.com">Email me!

Sometimes, you may want to link to another webpage,
but have it open in a
new browser window, leaving the
original webpage open beneath it. To do
this, you can
just add target="_blank" to the link. This tells the
browser
to make a new, blank window for the link.
The link would then look like
this:

a href="http://URL" target="_blank">TEXT


If you decide you really want complete control over
the new windows for your
links, you can use JavaScript.
Detailed instructions on how to do this can
be found
at HTML Goodies. Use these tricks with care,
however, since it's
easy to go overboard creating
too many windows. Note: Add <> to above code.


More: http://xrl.us/kywy

0 Comments:

Post a Comment

<< Home