Closed Thread Icon

Preserved Topic: ALT tags - can they be controlled? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=20477" title="Pages that link to Preserved Topic: ALT tags - can they be controlled? (Page 1 of 1)" rel="nofollow" >Preserved Topic: ALT tags - can they be controlled? <span class="small">(Page 1 of 1)</span>\

 
e-maestro
Bipolar (III) Inmate

From: Northwestern Lower Michigan, USA
Insane since: Apr 2001

posted posted 03-23-2002 22:47

When using the <IMG ALT=" ">, is it possible to control how the text of the alt displays?

My specific problem is that I want to put the name address and phone number in an ALT and would like to have the lines break appropriately. I have tried a few things with no success.

Anyone know anything about this?

e-maestro.

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-24-2002 00:31

I would think it'd be worth trying a /n for a newline, maybe? That works in a lot of cases, but I also expect that it's quite browser specific.

Your pal, -doc-

DocOzone
Maniac (V) Lord Mad Scientist
Sovereign of all the lands Ozone and just beyond that little green line over there...

From: Stockholm, Sweden
Insane since: Mar 1994

posted posted 03-24-2002 00:39

Yah, you can't use the /r or /n, but you *can* use &&#35;13; instead, which will force a carriage return in MSIE6 at least, I haven't tested it in any other browsers yet. (Test page for this is at http://fragilespace.com/ - alt text for the center image.) (edit) actually, I tested this again, I guess IE is the only one that has neifty little floating text for the alt tags? ANYways, it works.

Your pal, -doc-



[This message has been edited by DocOzone (edited 03-24-2002).]

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 03-24-2002 01:22

&#10;&#13; is what I use at http://www.runningwolf.com to lay things out a little nicer. Dunno about cross platform, though.




[This message has been edited by Pugzly (edited 03-24-2002).]

e-maestro
Bipolar (III) Inmate

From: Northwestern Lower Michigan, USA
Insane since: Apr 2001

posted posted 03-24-2002 01:43

WOW! I even got the DOCS attention with this one!

Thankyou!

I looked around for a while and found this list.
http://164.116.21.67/links/htmlchar.php

Again, thankyou for taking the time to answer!

e-maestro

eyezaer
Lunatic (VI) Mad Scientist

From: the Psychiatric Ward
Insane since: Sep 2000

posted posted 03-24-2002 01:52

nn 4.7 PC. it broke. sorry.

. . .

Wes
Paranoid (IV) Mad Scientist

From: Inside THE BOX
Insane since: May 2000

posted posted 03-24-2002 02:57

It's really not that hard to get Doc's attention. I usually just shake my car keys in the air. The noise and the shiny sparkle seem to do it.



e-maestro
Bipolar (III) Inmate

From: Northwestern Lower Michigan, USA
Insane since: Apr 2001

posted posted 03-24-2002 06:36

Pugzly

Why do you use #13 and #10 instead of just one or the other, which seems to do the same thing? (had to do that or they don't show up)

Why do I get this funny feeling that you like to make things as complex as possible? Can you give me a good reason for using both characters together?


eyezaer

Thx...but what is new?! Just so it works in IE I will be happy for this at least.



[This message has been edited by e-maestro (edited 03-24-2002).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 03-24-2002 07:42

On Windows OS, line-endings (in text files) consist of two characters - carriage return (13) and line feed (10), and that's the reason why you should use both.

On Macintosh, you should use only CR (13), and on UNIX you should use only LF (10).


Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 03-25-2002 22:22

What about TITLE?

Emps

e-maestro
Bipolar (III) Inmate

From: Northwestern Lower Michigan, USA
Insane since: Apr 2001

posted posted 03-26-2002 16:29

Good question!

I have seen some funky things in the Title bar too. Is there an easy way to do that, or do you have to use JavaScript? (which isn't very easy yet for me....maybe some day *sigh*)

Maybe this should be a new thread???

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 03-26-2002 17:26

You can manipulate with document title only from JavaScript (i.e. document.title = 'blah'; )...


u-neek
Bipolar (III) Inmate

From: Berlin, Germany
Insane since: Jan 2001

posted posted 03-26-2002 17:51

I think Emperor means the <a href="bla.html" title="This is the title of a link">BLA</a>

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 03-26-2002 21:29

Whoops sorry - what the title as demonstarted so well by u-neek.

Emps

e-maestro
Bipolar (III) Inmate

From: Northwestern Lower Michigan, USA
Insane since: Apr 2001

posted posted 03-27-2002 01:48

I don't get it....

What would be a the practical application of then <a HREF=" " TITLE=" ">? And why would you need special characters in it?

Sorry for my lack of imagination...but I have never seen it used.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 03-27-2002 03:40

e- maestro: I use TITLE a lot. Basically ALT has been used (wrongly) to provide a little simple message when you mouseover, e.g. an image button, telling you what to do:

code:
<a href="home.html"><img src="" alt="Click me to go home" /></a>



ALT should really be used to describe the image not the action and is very helpful for people who surf without graphics (its ugly but quicker) or are using another kind of device (I keep coming back to the blind but they are often overlooked). So you now can do this:

code:
<a href="home.html"><img src="" alt="Home" title="Click me to go home" /></a>



and now with TITLE you can have the equivalent of ALT with all sorts of different tags:

code:
<a href="home.html" title="Visit the good doctor for DHTML fun">Doctor Ozone</a>



You might want to break up the line with special characters (as described above for the ALT) otherwise if you put a lot of text in there it can become one big, ugly, unwieldy line or you might wish to use a foreign language.

Have a look at:
http://www.htmlhelp.com/reference/html40/attrs.html#title
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/title_1.asp

Basically the title attribute is a useful tool - its not supported in all browsers but including it doesn't do you any harm.

[edit: See also: www.javascriptkit.com/howto/toolmsg.shtml
www.netmechanic.com/news/vol2/html_no1.htm

also this last link answers my question!!]

Emps

[This message has been edited by Emperor (edited 03-27-2002).]

e-maestro
Bipolar (III) Inmate

From: Northwestern Lower Michigan, USA
Insane since: Apr 2001

posted posted 03-27-2002 05:27

OK...I think I understand...

But...if TITLE doesn't work on all browsers and ALT does, and they do the same thing....what is the advantage?

Maybe they don't do the same thing.

OH...the MSDN site is sooooooo complete! Problem is, it is like most indexes of Techy book...you can't find a @#%! thing! Unless geek-ese is your mother tounge!



e-maestro




kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 03-27-2002 10:26

e-maestro, the trick is that you can use TITLE with almost every tag, not only with images! You could put it on a <div>, or on a <p> or anything else. And it would always display a little tooltip as the ALT does when it's used on images.

kuckus

« BackwardsOnwards »

Show Forum Drop Down Menu