iLTC Home
Bookmark iLTC!
iLTC Google Boards

Google Groups
Receive The Code in Email!



Categories

Perl
  • Perl Tutorials Beginners

    Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

    HTML
  • HTML Tutorials



  • Pass the Javascript, please...
    20,070

    iLoveTheCode.com
    HTML > HTML Tutorials How To Easy > HTML Link

    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





    Dreamweaver CS3Dreamweaver CS3

    David McFarland

    New $29.69

    Head First HTML with CSS...Head First HTML with CSS & XHTML

    Eric Freeman, Elis...

    New $26.39

    Learning Web DesignLearning Web Design

    Jennifer Niederst ...

    New $29.69

    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.09

    Bulletproof Web DesignBulletproof Web Design

    Dan Cederholm

    New $26.39

    Struts 2 in ActionStruts 2 in Action

    Don Brown, Chad Da...

    New $29.69

    DojoDojo

    Matthew A. Russell...

    New $26.39

    jQuery in ActionjQuery in Action

    Bear Bibeault, Yeh...

    New $26.39

    CSSCSS

    David McFarland

    New $23.09


    Of Interest:
  • Substitute in Perl
  • Exit a Loop with Last
  • Renaming a File with Perl's RENAME Function
  • If, Elsif, and Else in Perl
  • Focus a Window with self.focus in Javascript
  • Use OnMouseOver in Javascript
  • Get String Length with Javascript
  • Javascript Push - Use Push on an Array in Javascript
  • HTML Image
  • HTML Body Tag
  • HTML Status
  • HTML Color Chart

  • More Articles:
  • Create or Put Items into an Array in Perl
  • Write a WHILE LOOP in Perl, Carefully
  • Substitute in Perl
  • Redirect to a Different URL in Perl
  • Javascript Alert
  • Javascript Change Fonts
  • Javascript Change Font Size
  • onClick Javascript
  • Increment a Variable in Javascript
  • Substitute in Javascript Using replace Method
  • Javascript Push - Use Push on an Array in Javascript
  • Getting Epoch Time in Javascript
  • HTML Status
  • HTML Image
  • HTML Color Codes
  • HTML Title Tag

  • Search iLTC w/ Google





    Recent Articles

  • Javascript Focus Form Field
  • Javascript Lowercase Text
  • Javascript Uppercase Text
  • Javascript Superscript Text
  • Javascript Subscript Text
  • Make Text Blink Using Javascript
  • Make a String into a Link in Javascript
  • Javascript Italics Text
  • Javascript Bold Text
  • Javascript Redirect
  • HTML Frames
  • HTML Color Chart
  • HTML Link
  • Javascript Status Bar








  • Perl Programming - Javascript Programming - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006 iLoveTheCode.com


    Contact Chris | About this Site


    316,810
    Counter by iLoveTheCode.com


    Last Modified: Friday, 23-Jun-2006 07:23:14 EDT