Naming images for when you hover them?

Discussion in 'HTML & Website Design' started by bbrian017, Dec 4, 2007.

  1. #1
    I was wondering how I could name my images properly. I notice when I hover them they all say yawoop. Can I change it so it displays the website name and not yawoop.

    Here is the code I'm currently using,

    <div align="center">
    <br><br/><br/>
    <div align="center"><a href="http://www.albumvotes.com/"><img src="css/album-votes.jpg" alt="<?=$site_name?>" border="0" /></a> <a href="http://www.flickvotes.com/"><img src="css/flick-votes.jpg" alt="<?=$site_name?>" border="0" /></a> <a href="http://www.yawoop.com/it/"><img src="css/yawoopit.jpg" alt="<?=$site_name?>" border="0" /></a> <a href="http://www.blogengage.com/"><img src="css/bouton-blog-engage.jpg" alt="<?=$site_name?>" border="0" /></a>  <a href="http://www.yawoop.com/games/index.php"><img src="css/bouton-games.jpg" alt="<?=$site_name?>" border="0" /></a> <a href="http://www.yoursourceforinfo.com/forums/"><img src="css/bouton-forum.jpg" alt="<?=$site_name?>" border="0" /></a> </div> 
    <br/><br/>
    Code (markup):
    but like I said when I hover them they all say yawoop :(
     
    bbrian017, Dec 4, 2007 IP
  2. snigster

    snigster Peon

    Messages:
    88
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You just need to change the alt tag.



    Change.... 
    
    alt="<?=$site_name?>" 
    
    to whatever you want it to say. i.e, alt="my picture"
    
    
    Code (markup):
     
    snigster, Dec 4, 2007 IP
    bbrian017 likes this.
  3. bbrian017

    bbrian017 Well-Known Member

    Messages:
    2,990
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    170
    #3
    bbrian017, Dec 4, 2007 IP
  4. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #4
    add an alt="" and title="" tag to the image, e.g. <img src="bob.jpg" alt="bob" title="bob" />

    The title is just so it does it on hover in FF as well, plus it's always nice to have another keyword placement.
     
    twistedspikes, Dec 4, 2007 IP
    bbrian017 likes this.
  5. joebert

    joebert Well-Known Member

    Messages:
    2,150
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    145
    #5
    Use whatever the image says for each images alt attribute.

    For instance, that first image would be
    <img src="css/album-votes.jpg" alt="Album Votes" border="0" />
    Code (markup):
    Screen readers for blind people also depend on the alt attribute for images, right now blind people are hearing "yawoop yawoop yawoop..." & thinking WTF the website's skipping like my record player ! Then closing the window.

    The reason search engines are using that to begin with, is they can't find anything better to use for a site description. Not even a description meta.
     
    joebert, Dec 4, 2007 IP
  6. bogs

    bogs Active Member

    Messages:
    2,142
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    80
    #6
    bogs, Dec 4, 2007 IP