iLTC Home
Bookmark iLTC!

Categories

Perl
  • Perl Tutorials Beginners

  • Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

  • HTML
  • HTML Tutorials

  • Command Line
  • Command Line Tutorials

  • How Tos
  • Other Tips and Tricks



  • $koko =~ s/\./:)/g;
    1726003

    iLoveTheCode.com

    HTML Link

    HTML links are easy to write and use.

    <a href=http://google.com target=_blank>This is a link to Google</a>

    -To link to another web page, we use the HTML anchor tag <a>
    -We use the href attribute to specify a web address. In this case, Google.
    -We use the target attribute to say we want the link to load in a new window (_blank)

    Options for the target attribute are:
        _blank - Loads in a new window, as mentioned above.
        _top - Loads in the current window. Busts out of a frameset.
        _parent - Loads in the Parent Frame.
        _self - Loads in the current frame.
        The name of any frame you would like the link to load in.

    To link to something on the very page you are on:

    <a href=#dude>This link takes you there.</a>

    <a name=dude>This is where you end up.</a>

    -First we create our link. A pound symbol # is placed in from of the anchor name.
    -We create the anchor and name it dude because we like the name.

    NOTES: If this anchor isn't somewhere on the page away from our link, the link won't appear to do anything. The link will move the browser window to the anchor only if necessary. Test it out.

    You'll also notice the #dude is tacked onto the URL in your address bar. Just a little tidbit for no reason.


    You can also use HTML links to open a piece of email for the user.

    <a href="mailto:chris@ilovethecode.com?subject=Have Fun, Dog!">Send me Email!</a>

    -We put mailto: in the href attribute.
    -We put the email address we wanted the mail to go to.
    -We put a question mark after the email address.
    -We put the subject attribute after the question mark.
    -We put our glorious title for the email.

    NOTES: Don't forget to wrap the value of the href attribute in quotation marks, or your email subject will get cut off if you have spaces.


    You can also put Javascript in HTML links.
        onClick
        onMouseover
        onMouseout

    <a href=http://google.com onClick="alert('Have fun at Google!')">This is a link to a better world.</a>



    Resources:
    HTML Tutorials
    Frames in HTML
    Title Tag in HTML

    The Classic BareBones Guide to HTML
    W3C's Official HTML 4.01 documentation

    Tags in HTML
    Color Chart in HTML
    HTML Codes





    Previous Article: HTML Status
    Next Article: HTML Color Chart






    Search iLTC w/ Google




    Recent Articles

  • HTML Font Code
  • Javascript and CSS - Easy Pop Up Help Balloons
  • Use OnMouseOver in Javascript
  • Use onMouseOut in Javascript
  • Use innerHTML to Change Text on a Page
  • Renaming a File with Perl's RENAME Function
  • PRINT to Browser with document.write Command in Javascript
  • Passing an Argument or Variable to a Javascript
  • Opening an Alert Box in Javascript
  • Opening a REMOTE WINDOW in Javascript
  • OPEN and WRITE a Data File in Perl
  • OPEN and READ a Data File in Perl
  • Mimic Typing from a Textfield in a Textarea with Javascript
  • Javascript Reset Form








  • Perl Programming - Javascript Programming - HTML Code - Mac Unix Command Line - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006-2009 iLoveTheCode.com


    Contact Chris | About this Site


    1725728
    Counter by iLoveTheCode.com


    Last Modified: Saturday, 10-Jan-2009 05:40:24 EST



    Hosted as well :)
    Home-brewed logo - 1997