xhtml: <image alt="blah blah" ... /> - what should it look like?

Discussion in 'ASP .Net' started by mark4asp, Jan 8, 2008.

  1. mark4asp

    mark4asp Guest

    <image alt="blah blah" ... /> - what should it look like?

    When I use <image alt="blah blah" ... />

    The alt value of an image tag is rendered inconsistently:
    * In Safari I see nothing. The alt value is ignored.
    * In IE6 I see a tooltip
    * In Firefox the alt attribute value is displayed on top of the image.
    With a small image the text overflows to the rhs.
    * In Opera the actual the alt attribute value is displayed on top of
    the image. With a small image the text is trucated within the width
    specified for the image.

    What's going on here? Do 3/4 of these browsers have bugs or is the
    xhtml specification missing something?

    The only sensible solution to this is for me to use blank alt tags
    <image alt="" ... /> and to use a title attribute instead.

    The empty alt tag is still needed because I want to use xhtml markup.
    However now my <asp:Image> [asp.net] tags are broke because when I when
    I specify them as <asp:Image AlternateText ="" ... /> they are rendered
    as <asp:Image ... /> i.e. with no alt tag at all.


    [FireFox 2.0.0.11, Opera 9.25, Build 8827, Safari 3.0.4 (523.13), IE 6
    sp6 (with latest updates) all running on WinXP sp2 with latest updates
    on asp.net 2 site using ms ajax.]
     
    mark4asp, Jan 8, 2008
    #1
    1. Advertising

  2. mark4asp

    mark4asp Guest

    mark4asp wrote:

    > The empty alt tag is still needed because I want to use xhtml markup.
    > However now my <asp:Image> [asp.net] tags are broke because when I
    > when I specify them as <asp:Image AlternateText ="" ... /> they are
    > rendered as <asp:Image ... /> i.e. with no alt tag at all.
    >

    Sorry I meant to say:

    they are rendered as <img ... /> i.e. with no alt tag at all.
     
    mark4asp, Jan 8, 2008
    #2
    1. Advertising

  3. According to HTML specs alt tag is used to show the picture's place when
    picture is not available (yet).

    So while browser still loading picture from the server the alt content will
    be shown to user so people with slow internet connection can get an idea
    what they are going to be looking at soon :)

    PS: First time I hear that firefox shows alt on top of the image. May be
    it's a setting in Firefox and you have it turned on because it's not the
    case usually.

    PPS: IE support tooltip attribute I believe. And I guess when it's not
    available it shows alt as a tool tip.

    George.

    "mark4asp" <> wrote in message
    news:4783548b$0$20530$...
    > <image alt="blah blah" ... /> - what should it look like?
    >
    > When I use <image alt="blah blah" ... />
    >
    > The alt value of an image tag is rendered inconsistently:
    > * In Safari I see nothing. The alt value is ignored.
    > * In IE6 I see a tooltip
    > * In Firefox the alt attribute value is displayed on top of the image.
    > With a small image the text overflows to the rhs.
    > * In Opera the actual the alt attribute value is displayed on top of
    > the image. With a small image the text is trucated within the width
    > specified for the image.
    >
    > What's going on here? Do 3/4 of these browsers have bugs or is the
    > xhtml specification missing something?
    >
    > The only sensible solution to this is for me to use blank alt tags
    > <image alt="" ... /> and to use a title attribute instead.
    >
    > The empty alt tag is still needed because I want to use xhtml markup.
    > However now my <asp:Image> [asp.net] tags are broke because when I when
    > I specify them as <asp:Image AlternateText ="" ... /> they are rendered
    > as <asp:Image ... /> i.e. with no alt tag at all.
    >
    >
    > [FireFox 2.0.0.11, Opera 9.25, Build 8827, Safari 3.0.4 (523.13), IE 6
    > sp6 (with latest updates) all running on WinXP sp2 with latest updates
    > on asp.net 2 site using ms ajax.]
    >
     
    George Ter-Saakov, Jan 8, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. evolve
    Replies:
    2
    Views:
    511
    William Ryan
    Nov 2, 2003
  2. A. Kong
    Replies:
    2
    Views:
    4,845
    Iwo Mergler
    Oct 11, 2004
  3. Hylander
    Replies:
    0
    Views:
    426
    Hylander
    Jan 16, 2004
  4. Waldy
    Replies:
    1
    Views:
    656
    Alvin Bruney [MVP]
    Oct 21, 2007
  5. mark4asp
    Replies:
    6
    Views:
    501
    George Ter-Saakov
    Jan 8, 2008
Loading...

Share This Page