www.webdeveloper.com
Results 1 to 4 of 4

Thread: Problems with using an image as a link and alt text

  1. #1
    Join Date
    Jul 2012
    Location
    Vantaa, Finland
    Posts
    125

    Problems with using an image as a link and alt text

    I have added this line of code to my url to link an image to another website. It's not working. The image isn't showing although the directory and file name are correct. What do I need to do to put it right?

    Code:
    <a href="http://www.faithlauncher.com/projects/206-operation-china#/"  target="_blank"><img src="http://what-do-christians-believe.co.uk/wdcb-images/FaithLauncher-Logo.png" alt="link to another site" title="faithlauncher logo"/></a>
    I've cut and pasted the code here as well. It's easier to read;

    <a href="http://www.faithlauncher.com/projects/206-operation-china#/" target="_blank"><img src="http://what-do-christians-believe.co.uk/wdcb-images/FaithLauncher-Logo.png" alt="link to another site" title="faithlauncher logo"/></a>


    I do have a validator error but the errors are caused by a plug in;

    Error: & did not start a character reference. (& probably should have been escaped as &amp;.)
    At line 106, column 97
    ?id=22608638705&memberidtype=a
    Error: & did not start a character reference. (& probably should have been escaped as &amp;.)
    At line 106, column 119
    idtype=artistid&memberid=22608

    the plugin code is;

    <div class="instaprint">
    <script type='text/javascript' src='http://instaprints.com/slideshowmouseover.php?id=22608638705&memberidtype=artistid&memberid=226086&width=250px&height=250px '></script>
    <img id='faaslideshowimage[22608638705]' onClick='javascript: mouseclick22608638705(event);' onMouseOver='javascript: mouseover22608638705();' onMouseOut='javascript: mouseout22608638705();'src='http://fineartamerica.com/Blank.jpg' style='width: 250px; height: 250px; padding: 0px; margin: 0px; border: 1px solid #666666; cursor: pointer; cursor: hand;' alt='Art Prints' title='Art Prints'>
    </div>

    Is there anything that I can do to put this right?

  2. #2
    Join Date
    Mar 2012
    Posts
    1,814
    Yes - read the error message that comes up if you google the url of the image!

  3. #3
    Join Date
    Jul 2012
    Location
    Vantaa, Finland
    Posts
    125
    Thanks for that!

  4. #4
    Join Date
    Sep 2013
    Posts
    221
    Try out the below code,it may help you.

    <img src="mum_university.jpg" width="150" height="117" alt="University of Mumbai logo" />

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles