Need help for ALT tags...

Discussion in 'HTML & Website Design' started by tptnyc, Jun 15, 2007.

  1. #1
    Tried alt tags "quality ribbons" here but it gives error. I think because of backward \ slash which of course can't be removed since it is a index.php file. Need help on inserting alt tags at the right place.


    <tr>
    <? echo "<td valign=top align=left ><a href=index.php ><img src=\"images/banner.JPG\" border=0</a>
    </td>"; ?>
    </tr>
     
    tptnyc, Jun 15, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Your thread should be on PHP forum.
    Although I don't know PHP, I guess you can use single-quotes (') instead of (\").
     
    ajsa52, Jun 15, 2007 IP
  3. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    sorry, yeah it is with single (') alt i tried. And removing \ backlash also doesn't help since it is in index.file.
     
    tptnyc, Jun 15, 2007 IP
  4. Sepehr

    Sepehr Peon

    Messages:
    568
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    try this:
    when you use " in your php code you can use ' for html or java script parts of the code also the img tag wasn't closed!
     
    Sepehr, Jun 15, 2007 IP
  5. Mooseman

    Mooseman Peon

    Messages:
    453
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It doesn't really matter if you use ' or \" , it's pretty much the same thing.

    
    <tr>
    <? echo "<td valign='top' align='left' ><a href='index.php'><img src='images/banner.jpg' border='0' alt='quality ribbons' /></a>
    </td>"; ?>
    </tr>
    
    Code (markup):
    Is that what you wanted?
     
    Mooseman, Jun 15, 2007 IP
  6. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks, finally i got it right.
     
    tptnyc, Jun 15, 2007 IP