How to add a link to an image in html

9 replies
  • WEB DESIGN
  • |
guys this should be a newbie thing but i am not used to html and i think it should be pretty simple.

I want to add a link to an image (an url)

i have this line where is the image, and how can i add the link:

<td width="629"><img src="images/image1.png" width="184" height="91"></td>

i have tried to add in the same line the following code:

<a href "http://yoursite.com" a>

but the link did not worked.
#add #html #image #link
  • Profile picture of the author Richard Whyte
    You need to wrap the image info in the anchor (anchor is the link code) tag. So you end up with this line.

    <td width="629"><a href "http://yoursite.com"><img src="/images/image1.png" width="184" height="91"></a></td>

    On a different note, Tables are very old and you should be thinking about removing them. I know they are still used, but they are hard to make your website responsive if you are using them. Tables are very old school and not the best way to be coding your page.
    {{ DiscussionBoard.errors[9483885].message }}
  • Profile picture of the author bakintime
    hi.

    best thing to do is go to your saved file click on the pic type the link in easy fast and works ive done it. im using dreamweaver cs3 then when im ready to upload the file its ready for the net. already to go....

    im a newbie and it works
    {{ DiscussionBoard.errors[9486198].message }}
  • Profile picture of the author copilu0
    Totally agree with Richard Whyte solution. Don't look for anything else because that is what you need.
    {{ DiscussionBoard.errors[9486541].message }}
  • Profile picture of the author Rick Rodd
    Online tool resource ibdguy.com

    Just place the image and it automatically sets up the link.
    Signature
    Please follow our Warrior Forum Rules and Regulations!
    WSO Marketplace Rules[/URL]

    Do You have any Questions, Comments or Suggestions?
    Warrior Forum KnowledgebaseWarrior Forum Help DeskSuggestions Forum
    {{ DiscussionBoard.errors[9486547].message }}
  • Profile picture of the author MichaelParis
    Hay
    Use the following HTML code for adding or creating the link to an image

    <!DOCTYPE html>
    <html>
    <head>
    <title>Image Hyperlink Example</title>
    </head>
    <body>
    <p>Click following link</p>
    <a href="http://www.tutorialspoint.com" target="_self">
    <img src="/images/logo.png" alt="Tutorials Point" border="0"/>
    </a>
    </body>
    </html>
    Signature
    {{ DiscussionBoard.errors[9489169].message }}
    • Profile picture of the author terence55
      Originally Posted by MichaelParis View Post

      Hay
      Use the following HTML code for adding or creating the link to an image

      <!DOCTYPE html>
      <html>
      <head>
      <title>Image Hyperlink Example</title>
      </head>
      <body>
      <p>Click following link</p>
      <a href="http://www.tutorialspoint.com" target="_self">
      <img src="/images/logo.png" alt="Tutorials Point" border="0"/>
      </a>
      </body>
      </html>
      It is a very clear example for adding the link to an image. I have tried out this. It is working.
      {{ DiscussionBoard.errors[9494343].message }}
  • Profile picture of the author morg2k2
    Thanks guys, i will test it out.

    regards,
    morg
    {{ DiscussionBoard.errors[9489296].message }}
  • Profile picture of the author anilkvm85
    The above code is working, thanks..
    {{ DiscussionBoard.errors[9489768].message }}
  • Profile picture of the author pcgun007
    <p><A Href="your link"><img border="0" src="Image Link" alt="Alt Text" width="184" height="91"/></a></p>
    Signature
    Google Maps Scraper with Valid Email Addresses - GMap Leads Generator
    ‿︵‿︵.。*゚+.*.。(❁´◡`❁)。.。:+ *‿︵‿︵
    {{ DiscussionBoard.errors[9491550].message }}

Trending Topics