close window  Close window
How to Insert HTML Code into Your Web Pages
Here are the HTML tags and their attributes which are used to insert links in web pages:
  • <a> (anchor tag): the HTML tag used to link to another document. It requires an end tag, which looks like this: </a>.
    • href: an attribute of the anchor tag which specifies the URL of the target destination (where the user will be taken when link is clicked on).
    • target: an attribute of the anchor tag which specifies where the target page should be displayed - in the same browser window as the link, in a new window, etc.
  • <img> (image tag): the HTML tag used when wishing to display an image on a web page. It does not require an end tag.
    • src (source): an attribute of the image tag which specifies the URL where the image is located.
    • border: an attribute of the image tag which specifies whether a border should be displayed around the image.
Here are some examples of these HTML tags in use:
  1. anchor tag: Below is a sample link that takes you to the Google Affiliate Network home page:

    To go to the Google Affiliate Network home page, click here


    In actual HTML, the code for this link would look like this:

    To go to the Google Affiliate Network home page, click <a href="http://www.google.com/ads/affiliatenetwork">here</a>


    Notice in the example above that you are only able to click on the word "here!" This is because the word "here!" is located between the opening anchor tag (<a >) and the closing anchor tag (</a>). Because this is an anchor tag, you need to show where you wish the user to go once the link is clicked. The "HREF" attribute allows you to specify a location, called a URL, for this destination. In the above example, the user will be taken to the default Google Affiliate Network home page; the URL for this page is: "http://www.google.com/ads/affiliatenetwork".

    To specify any other page within your site, you need to include the directory and/or page name, such as in this link:

    To go to the ConnectCommerceSM Login page, click here


    Which would look like this in HTML code:

    To go to the ConnectCommerceSM Login page, click <a href="/global/login.html">here</a>


    The above example will open the destination page in the same browser window as the current page (where the link is). If you want to open the destination page in a new browser window, use the anchor tag's target attribute, and set the value to "_blank" or "_new", as in the HTML code below:

    To go to the ConnectCommerceSM Login page, click <a href="/global/login.html" target="_blank">here</a>

     

    The way the link appears on the page does not change at all, however:

    To go to the ConnectCommerceSM Login page, click here



  2. image tag: Below is an example that displays the Google Affiliate Network logo:
    Google Affiliate Network - powered by ConnectCommerce

    The actual HTML code for this image would look like this:

    Note that in order to display an image properly, you must provide the location where this image actually resides in the "SRC" attribute. The URL address (or pathname) for the image can be either relative or absolute.


    • A relative pathname points to a file or directory relative to the current file's directory, which means the destination file is usually within the same file system.
    • An absolute pathname includes the entire URL address, beginning with the root directory, which for a web site is usually "http://" (or "https://"), then the domain name – such as "www.yoursite.com" – and then the file directory and file name (if necessary).

    NOTE: For the links you create, it is necessary to use absolute pathnames for the URL addresses in the anchor tags.

  3.  

  4. Using image tags and links together:  It is also possible to turn an image into a link. To do this, all you need to do is place anchor tags around an image tag. The HTML code for an image link would look like this:

    <a href="http://www.google.com/ads/affiliatenetwork">
      <img src="/images/logo_masthead.gif">
    </a>


    Notice that there is a border surrounding the image above. To remove an image´s border (and still have the image be a link), add a the "border" attribute to the image tag, and set it equal to zero, like this:

    <img src="/images/logo_masthead.gif" border="0">


    The resulting image is still "clickable", but does not have a border:


Using Flash™ links and embedding them in your HTML code:
Flash-based links differ from other graphical links, including animated GIFs, because they are movies and are in a different format. Embedding Flash links in your HTML code requires the use of two other HTML tags, <OBJECT> and <EMBED>. However, in order for ConnectCommerce to be able to track activity with Flash links, the Flash files first need to be set up in cooperation with the Advertiser and/or your Google Affiliate Network representative. For details on using Flash links in ConnectCommerce, click here, or visit the Macromedia Flash TechNote page.
For more information on how to use HTML code, check out the following sites:
close windowclose window
close window  Close window