PDA

View Full Version : Alt tags for URL Links


llbbl
05-20-2005, 08:10 AM
If you want an ALT tag to show up for your URL Link all you have to do is add the title attribute to your tag. For instance.

<a href="#" title="impeach gwb">some text</a>

Poof instant ALT tag. Neet little trick.

k2
05-20-2005, 09:12 AM
title attribute (http://www.w3.org/TR/html401/struct/global.html#adef-title)
"This attribute offers advisory information about the element for which it is set."

alt attribute (http://www.w3.org/TR/html401/struct/objects.html#adef-alt)
"For user agents that cannot display images, forms, or applets, this attribute specifies alternate text. The language of the alternate text is specified by the lang attribute."

the 2 attributes have nothing in common, firefox and ie render the title attribute in the browser window; but title is not a replacement for alt.

llbbl
05-20-2005, 10:15 AM
yea except for <a> tags, the alt attribute does't work . Alt works for (IMG, AREA, APPLET, and INPUT) I meant to say.

k2
05-20-2005, 10:19 AM
ugh, it's for browsers like lynx and screen readers. it's not a visual indication of what the link is supposed to be; that's what title is for.

llbbl
05-20-2005, 10:20 AM
well how does that stupid contextual links work then? gah I hate that crap.

k2
05-20-2005, 10:23 AM
alt describes the element, i don't understand the confusion.

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.

llbbl
05-20-2005, 10:24 AM
Oh i think it is using javascript. It returns the word to the javascript function that is associated with the class iAs.

http://news.designtechnica.com/article7502.html

<div name="intelliTxt" id="intelliTxt">
<p>
"The service, similar to offerings from its competitors, lets users aggregate information, search,
<a target="_blank" href="#" style="border-bottom: 1px solid darkgreen; background-color: ; text-decoration: underline; color: darkgreen; font-size: 10pt;" class="iAs">email</a> and other content in their own personal portal to the <a target="_blank" href="#" style="border-bottom: 1px solid darkgreen; background-color: ; text-decoration: underline; color: darkgreen; font-size: 10pt;" class="iAs">web</a>.

k2
05-20-2005, 10:26 AM
yeah, those are usually divs dynamically placed at the mouse cursor.

llbbl
05-20-2005, 10:29 AM
hmm i think intellitxt must be something done in php (server side) because it is not in the javascript. I can't find the client side code for it in that page. I looked in the css and both .js files that are associated with that particular news item.

llbbl
05-20-2005, 10:33 AM
this company does contextual ads. I wonder if that is what we are using.

http://www.ads-click.com/

llbbl
05-20-2005, 10:34 AM
if it was DHTML than it would be in the *.css ...

k2
05-20-2005, 10:38 AM
no, css can't track the mouse and php is serverside; it can't interface with the mouse either.

this is what you were looking for, found at the bottom of the page; looks like it just tags certain words.

<!-- start Vibrant Media IntelliTxt script section -->
<script language="javascript" src="http://designtechnica.us.intellitxt.com/intellitxt/front.asp?IPID=55&MK=3&ul=border-bottom:darkgreen+1px+solid;text-decoration:underline;color:darkgreen;font-size:10pt"></script>
<!-- end Vibrant Media IntelliTxt script section -->

llbbl
05-20-2005, 10:39 AM
hey can you put [ code ] BB code around that plz

llbbl
05-20-2005, 10:41 AM
so the contextual crap is created with javascript window right it is not with the title tag?

k2
05-20-2005, 10:42 AM
correct.

the title attribute is best used on nagivation, or images for a mouse-over explanation.

llbbl
05-20-2005, 10:45 AM
ok so u want to know why I was looking for Alt tag for URL. It is because there was an acronym that I used in a navigational menu that would have made the menu way too big and look stupid. I couldn't rename it because the acronym stood for that website. So I put in the title tag what the acronym stood for. If i made a image in Image Ready or Illustrator than I would have used the alt tag instead.

k2
05-20-2005, 10:49 AM
sounds about right for how to use the attributes. if you're curious if you're using things properly, validate the page with the w3c validator (http://validator.w3.org/).

llbbl
05-20-2005, 11:03 AM
unfortunately that won't work my friend, access to the server is locked down and uploading code to a public page would be frowned upon. It would have to be a locally hosted w3c checker. dreamweaver would work except some pages are all in php and it can't handle that.

llbbl
05-20-2005, 11:03 AM
oh i know . i guess i could save the source and create a new document in dreamweaver.

Archon
05-20-2005, 11:12 AM
Im confused, what is this thread even talking about?

title is the hover-over information for images and links n shti, alt on images is the text that is displayed if the image cannot be.

/boggle

llbbl
05-20-2005, 11:21 AM
so alt won't do the hover over thing for images? damn I guess you got to use title in the case also.

I think you can use id tag in place of alt tag in some cases is that right?

k2
05-20-2005, 01:30 PM
no, id's are used for referencing an element. alt's are for descriptions.