dcsimg
www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Image Alt Text: Advice Wanted

  1. #1
    Join Date
    Feb 2007
    Posts
    7

    Miscellanious questions (see EDIT)

    I tried searching for this but "alt" is too common a word.
    ----
    I'm not sure what I should set as the value of the alt attribute for decorational images. alt="" or alt="foo icon"?

    On the one hand, it would be annoying for screen readers to read "foo icon" all the time, especially when it says "foo" in plain text right next to it anyway. Even for people with sight, it would be silly if it said "foo icon foo".

    On the other hand, during the time that I experimented surfing with images disabled, I found that a lot of images had no alt text, and when I saw a blank box I really wanted to know what the image that I knew was supposed to be there was.

    Or maybe I should put alt="[image: foo icon]", in case the majority of text-only browsers don't indicate that a piece of text is actually an image?
    ----
    I can't weigh the benefits and consequences of each path on my own, so I'm taking it to you, the experts.

    If this topic is just highly debatable, a matter of personal opinion, I will decide to describe the exact purposes of decorational images (alt="foo icon").
    -------
    Also, what is the difference in CSS between ex units and em units? As far as I know em units are the size of capital ems and ex units are the size of lowercase "x"s.
    -------
    Another CSS question: How come different elements are rendered in different sizes if their specified width/height are exactly the same? Really I've only seen pages in Firefox 2 and IE 6.
    -------
    Now an HTML question: How can I make the browser use the tags I put in the title/alt attributes of an image? It displays the greater than sign I put literally.

    EDIT: Unanswered questions:
    Link to an icon with rel="shortcut icon" and rel="icon" or just rel="shortcut icon"?
    Sometimes JPEGs are smaller than PNGs; Save all images as PNGs anyway, for consistency?
    Last edited by Zort; 02-23-2007 at 06:43 PM. Reason: Questions answered, new questions now

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    If it's just decoration then alt="" should suffice.

    Also em is a horizontal measure, ex is vertical.

    In theory they should be the same size if they are physically defined.

    Title and alt are plain text.

  3. #3
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,279
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  4. #4
    Join Date
    Feb 2007
    Posts
    7
    @Charles: Actually I read both those sections. I thought the alt attribute was a matter of personal opinion and I didn't understand the ems and exs.

    Another thing: Is there any good website that can teach me how to make a website look good? Any site I find seems to be about HTML or CSS or the importance of a consistent navigation. Except for Pegawebs, but I don't have Photoshop.
    ----
    Should I link an icon with both rel="shortcut icon" and rel="icon", or just rel="shortcut icon"?
    Last edited by Zort; 02-18-2007 at 11:15 AM.

  5. #5
    Join Date
    Jan 2007
    Posts
    38
    If the image is decorational I generally set it as the Background image in CSS and therefore don't have to set an alt tag for it.

    A good guide for making "web 2.0" style designs at http://www.webdesignfromscratch.com/...tyle-guide.cfm

  6. #6
    Join Date
    Feb 2007
    Posts
    7
    Thanks aswebdesign.

    JavaScript question: Why does Internet Explorer sometimes disable scripts and sometimes not?

  7. #7
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Internet Explorer doesn't understand Javascript so it runs it as JScript instead. JScript can call activeX functions to perform tasks not built into JScript. ActiveX can access the local computer in ways that Javascript cannot and in some instances can completely compromise the security of the computer. Microsoft has therefore categorised the ActiveX based on what it does and where the JScript that calls it was loaded from. There are also about a dozen or so security options that can be set in the Internet Options that control what will and wont run in which security zone. Depending on all these settings IE may run a script, may pop up one or more alerts asking you to confirm that it should run or may disable it.

    As other browsers run Javascript rather than JScript and don't have ActiveX they don't need to block ActiveX from running under selected circumstances because they can't run it anyway.

  8. #8
    Join Date
    Feb 2007
    Posts
    7
    CSS question: Should I size images with ems or with pxs? With ems they are resizable like the text, which personally I find quite a nice feature, but perhaps users will not expect that.
    Web design question: Sometimes jpeg is smaller than png. But should I save all images as png anyway, for consistency?
    Last edited by Zort; 02-18-2007 at 06:52 PM.

  9. #9
    Join Date
    Nov 2006
    Location
    Nursing Home
    Posts
    268
    Quote Originally Posted by Zort
    CSS question: Should I size images with ems or with pxs? With ems they are resizable like the text, which personally I find quite a nice feature, but perhaps users will not expect that.
    Web design question: Sometimes jpeg is smaller than png. But should I save all images as png anyway, for consistency?

    images distort when resized so they should have a fixed size (the size of the image you upload to go onto the site)

  10. #10
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    well regular images are stored as so many pixels by so many so if you specify a different size in the page to the actual image size then you either have a bigger file than you need to for the image or the image will not be as clear as it ought to be (depending on whether you display it smaller or bigger than it really is).

  11. #11
    Join Date
    Mar 2005
    Location
    Idaho, USA
    Posts
    209
    Quote Originally Posted by grumpyoldtechs
    images distort when resized so they should have a fixed size (the size of the image you upload to go onto the site)
    What about specifying their size in %?

  12. #12
    Join Date
    Nov 2006
    Location
    Nursing Home
    Posts
    268
    Quote Originally Posted by The Old Sarge
    What about specifying their size in %?
    it will have the same effect as if you use em/ex

  13. #13
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Any image that isn't displayed at 100% of its original size will either be wasting time if displayed smaller or will appear blurred if displayed larger.

  14. #14
    Join Date
    Feb 2007
    Posts
    7
    Should I store all icons as .ico?
    You can lose quality if you shrink an image a lot because some important aspects of the picture (such as a chunk of an arm, assuming it's a photograph of a person) can get cut out.
    Quote Originally Posted by grumpyoldtechs
    it will have the same effect as if you use em/ex
    Doesn't % depend on the parent element?
    Last edited by Zort; 02-19-2007 at 03:47 PM.

  15. #15
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    Should I store all icons as .ico?
    Probably not. Stick with GIF, PNG and JPEG for widest compatibility.
    You can lose quality if you shrink an image a lot because some important aspects of the picture (such as a chunk of an arm, assuming it's a photograph of a person) can get cut out.
    Yes. In fact you will lose quality any time you allow a browser to resize an image. Images should be dimensioned to their natural pixel sizes, not resized with the width/height attributes or CSS.

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