eHow launches Android app: Get the best of eHow on the go.

How To

How to Use HTML Tags for Links

Member
By thehorsecoach
User-Submitted Article
(0 Ratings)
Use HTML Tags for Links
Use HTML Tags for Links

HTML code isn't difficult to write, but it can seem challenging until you get the hang of various formulas. HTML tags for links are essentially the same every time you use them, but you have to know which tag to use in what situations.

From Quick Guide: All About HTML Text
Difficulty: Moderately Challenging
Instructions

Things You'll Need:

  • URL of the page to which you are linking
  • Plain text editor suitable for writing HTML, such as Notepad

    Create HTML Tags for Text Links

  1. Step 1

    Determine the page to which you will be linking. Make sure, unless you are linking to a home or Splash page, that you get the full URL, including the protocol (e.g., http) and any sub-domains or paths.

  2. Step 2

    Enter the opening HTML tag for links, which is {a href="destinationURL"}. Instead of using braces ({ and }), use angle brackets (< and >).

  3. Step 3

    Fill in the text you want to appear in order for the HTML link to show up. For example, a common phrase to indicate a link is "click here".

  4. Step 4

    Enter the closing HTML tag for links, which is {/a}. There should be no spaces between the linked text and the HTML tags, so make sure you've deleted any spaces.

  5. Step 5

    Ensure your finished product looks something like this: {a href="http://www.mysite.com"}click here{/a}

  6. Create HTML Tags for Image Links

  7. Step 1

    Enter the opening HTML tag for linking images, which is {img src="location". Again, replace the braces with angle brackets.

  8. Step 2

    Add a height and width for your image to make sure that it isn't too large or too small for your website. It should make the opening tag look like: {img src="location" width="100" height="100".

  9. Step 3

    Include alternate text that will be displayed for browsers that won't display your image or for the visually impaired. The opening HTML tag for the link will now look like: {img src=, followed by: "location" width="100" height="100" ALT="this is a picture".

  10. Step 4

    Close the HTML tags with a simple angle bracket (>)

  11. Step 5

    Ensure your finished product looks similar to this: {img src="http://www.mypage.com/mypicture/" width="100" height="100" ALT="this is a picture">

Tips & Warnings
  • Make sure you close all HTML tags when creating links so that they show up correctly in the browser.
  • Try to use a height and width that approximately corresponds with the correct height and width for your image so that it doesn't come out distorted.

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Tags
Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow's Internet Expert.

Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Demand Media
eHow_eHow Technology and Electronics