Print Page | Close Window

Line break in alt tag

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15904
Printed Date: 31 March 2026 at 1:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Line break in alt tag
Posted By: Amateur
Subject: Line break in alt tag
Date Posted: 20 July 2005 at 4:44am
How do I put a line break into an images ALT tag?



Replies:
Posted By: huwnet
Date Posted: 20 July 2005 at 5:36am
I dont think it is possible but I dont know for sure. Confused


Posted By: dpyers
Date Posted: 20 July 2005 at 10:56am
I think huwnet's right.
Yould do something similar to the alt tag with javascript and have line breaks but you'd still need the alt tag for the page validate. don't know ehat that would look like.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Amateur
Date Posted: 20 July 2005 at 11:27am
Alright thanks. If anyone comes accross a way of doing such they might post it please.


Posted By: michael
Date Posted: 20 July 2005 at 4:51pm
As said, there is no way to put markup into an alt tag but you can like dpyers mentions use JS instead of the alt tag like here: http://dynamicdrive.com/dynamicindex4/imagetooltip.htm - http://dynamicdrive.com/dynamicindex4/imagetooltip.htm

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Amateur
Date Posted: 20 July 2005 at 5:52pm
Cheers michael.
 
One question - will adding alot of text to an alt tag slow down rendering?


Posted By: dpyers
Date Posted: 20 July 2005 at 6:19pm
It's javascript so it's always slow when it executes.
Shouldn't impact page redering unless you're doing something onload. Some of the javascripts for this type of thing also allow images. You'd probably want to preload them before the page renders which might slow things down some.

A search engine will look at alt image text and toss a few points your way if it's got content related stuff in it. Don't beleve they do the same for text in javascript though.


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: theSCIENTIST
Date Posted: 20 July 2005 at 6:27pm
You can actually break TITLE not sure about ALTs but it's probably the same, check the picture on this mod I done:

http://forums.webwiz.net/forum_posts.asp?TID=11975 - http://forums.webwiz.net/forum_posts.asp?TID=11975

I'm using TITLE to display a tooltip, and use (vbCrLf) for the breaks:

TITLE="<% Response.Write(vbCrLf & "  • " & "myToolTipText") %>"


Try:

ALT="<% Response.Write(vbCrLf & " • " & "myToolTipText") %>"

NOTE: This works great in IE but not in Firefox.

-------------
:: http://www.mylittlehost.com/ - www.mylittlehost.com


Posted By: Amateur
Date Posted: 21 July 2005 at 6:47am
Cheers lads, will take everything ye said on board.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net