psuedocode
03-27-2005, 06:13 PM
which is better to use, as far as search engine ranking and proper code; using alt tags or title tags?
|
Click to See Complete Forum and Search --> : title or alt? psuedocode 03-27-2005, 06:13 PM which is better to use, as far as search engine ranking and proper code; using alt tags or title tags? fredmv 03-27-2005, 06:27 PM Depends totally on the element in question you're going to use it in. The general rule is alt for images, title for everything else. MstrBob 03-27-2005, 06:55 PM Use the attributes for their purpose. Alt is alternative text, which is used by user agents that don't support certain non-textual elements, like images, applets, and form fields. Title attributes are used to provide extra explanatory information on an element. An image, for example, can have both attributes, alternative text with a quick description of an image, and a title giving a quick explanation about the image. js_prof_cons 03-27-2005, 07:35 PM And remember the alt attribute is required for images. To my knowledge, title is optional on everything else, as pointed out above. Charles 03-27-2005, 09:06 PM Several non-textual elements (IMG, AREA, APPLET, and INPUT) let authors specify alternate text to serve as content when the element cannot be rendered normally. Specifying alternate text assists users without graphic display terminals, users whose browsers don't support forms, visually impaired users, those who use speech synthesizers, those who have configured their graphical user agents not to display images, etc. The alt attribute must be specified for the IMG and AREA elements. It is optional for the INPUT and APPLET elements. While alternate text may be very helpful, it must be handled with care. Authors should observe the following guidelines: * Do not specify irrelevant alternate text when including images intended to format a page, for instance, alt="red ball" would be inappropriate for an image that adds a red ball for decorating a heading or paragraph. In such cases, the alternate text should be the empty string (""). Authors are in any case advised to avoid using images to format pages; style sheets should be used instead. * Do not specify meaningless alternate text (e.g., "dummy text"). Not only will this frustrate users, it will slow down user agents that must convert text to speech or braille output. http://www.w3.org/TR/html401/struct/objects.html#adef-alt felgall 03-28-2005, 04:28 PM <img src="myimage.gif" width="100" height="100" alt="text to display in place of image if image doesn't load" title="text to display if visitor puts their mouse cursor over the image" /> Internet Explorer incorrectly displays the alt text for mouseover which leads to confusion relating to the meaning of these two attributes. They can both be included and serve different purposes. js_prof_cons 03-28-2005, 04:58 PM [code]Internet Explorer incorrectly displays the alt text for mouseover which leads to confusion relating to the meaning of these two attributes.Incorrectly implies they meant to be standards-compliant. I don't believe that is the case, do you? MstrBob 03-28-2005, 05:02 PM Well, IE does display the alternative text on mouseover, if the option is enabled. However, if you include a title attribute, it will display that instead. It's more of an extra option, however, designers not fully understanding HTML take it that you use alt for this purpose, hence the confusion. felgall 03-29-2005, 05:06 PM Incorrectly implies they meant to be standards-compliant. I don't believe that is the case, do you? Are you suggesting that Microsoft have deliberately refused to follow the standards? I thought that it was purely an accident on their part. :) js_prof_cons 03-29-2005, 05:55 PM Are you suggesting that Microsoft have deliberately refused to follow the standards? I thought that it was purely an accident on their part. :)I don't think it was an accident, but Microsoft surely decided they would create their own standards. Scary enough, they have the biggest effect on them (after the W3C themselves), because they "control" the most people. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |