what is the code of alt tag title?

Discussion in 'Search Engine Optimization' started by amytailor, Jul 5, 2007.

  1. #1
    hi,
    what is the title code for alt and what is its benefit??
     
    amytailor, Jul 5, 2007 IP
  2. Noddegamra

    Noddegamra Peon

    Messages:
    1,013
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you are referring to alt and title tags then..


    <img src="folder/image_name.jpg" alt="image description" title="image description" />
    Code (markup):
    I hope that helps, your posts wasn't totally clear :)
     
    Noddegamra, Jul 5, 2007 IP
  3. Directory4

    Directory4 Well-Known Member

    Messages:
    167
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #3
    alt tag title is in the image section and come along with alt tag. Internet Explorer will display alt tag of image while firefox didn't. However, Firefox will display alt title tag instead.

    Sample:-

     
    Directory4, Jul 5, 2007 IP
  4. catanich

    catanich Peon

    Messages:
    1,921
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <img src="/images/logo.gif" height="30" border="0" title="Jim Catanich Internet Marketing Dallas Texas">

    <img src="/images/logo.gif" height="30" border="0" alt="Catanich Internet Marketing Dallas Texas">

    But if you use both

    <img src="/images/logo.gif" height="30" border="0" title="Jim Catanich Internet Marketing Dallas Texas" alt="Catanich Internet Marketing Dallas Texas">

    IE displays the title="Jim Catanich...

    So I guess we should start using the title attribute in our images.
     
    catanich, Sep 10, 2007 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Understand that these two attributes (they're NOT tags) have two very different purposes.

    The alt="" attribute is used to identify what an image is about (for example if you have a picture of a daffodil, the alt attribute should say it's a picture of a daffodil), whereas the title="" attribute is used to describe and provide further information about the image (or other element, since it can be used elsewhere; note that alt="" can be used ONLY inside images), like" A bouquet of daffodils sitting in a pink vase" for instance.
     
    Dan Schulz, Sep 10, 2007 IP
  6. catanich

    catanich Peon

    Messages:
    1,921
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Dan, which do you use? and where? and do you recommend that they both be used?
     
    catanich, Sep 10, 2007 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #7
    For the site header/masthead, I use an IMG element with the alt attribute identifying what the image is, followed by an empty title attribute to get around a nasty Internet Explorer bug (which is perfectly acceptable to the search engines since it doesn't contain any content).

    My menus are plain text using CSS to style their appearance (and sometimes their presentation if using an image substitution technique, which I do only if I'm using a custom font), so as such they don't need to use the alt attribute (which is only used on images). However, I will use the title attribute here, and ONLY to describe what the menu item's function is (like "Go to Dan Schulz's home page" for the home page link" for example).

    Otherwise, I use the title attribute sparingly (I will use it on links to indicate that it's a link, and then describe what the link's content is about, for example in my forum signature link "All You Need to Know About SEO" I would use "Link: essential Search Engine Optimization techniques for Web designers and developers" or as a tooltip to define a term like CSS in which case I'd use "CSS: Cascading Style Sheets - a presentational markup language used to determine the appearance of a Web page"; I'll also use it on a content image to describe what the image is about). I don't stuff keywords in them, but I will include one or two of them if I can get away with it since I concern myself with making sites accessible and easy to use for as many people as possible. Which means everything I do is done with PEOPLE, not search engine spiders, in mnd, save for my use of the least amount of clean semantic and valid HTML, clean minimal and valid CSS and JavaScript stored in external files that are then linked to the Web page as possible, that is.
     
    Dan Schulz, Sep 10, 2007 IP