Forum Moderators: open

Message Too Old, No Replies

new line in alt text ?

         

carsten888

6:47 am on Sep 18, 2009 (gmt 0)

10+ Year Member



In a html-newsletter I want to add mulitiline alt-text. How to make a new line?

this seemed to have worked in old browsers, but not anymore:
<img src="img.jpg" alt"line1
line2" />

this does not work either:
<img src="img.jpg" alt"line1 \n line2" />

anyone?

Seb7

5:29 pm on Sep 18, 2009 (gmt 0)

10+ Year Member



I didnt realise they've taken the newline out of the alt text. Have you tried: title="line1/nline2". You can use both alt and title.

If your looking for mouse over messages your probably find javascript better - this is what I do. Try searching 'dhtml balloon tips'

Seb7

5:29 pm on Sep 18, 2009 (gmt 0)

10+ Year Member



oops. just noticed you said newsletter. Javascript wont work there.

carsten888

5:50 pm on Sep 18, 2009 (gmt 0)

10+ Year Member



whats even worse is that in most mailclients, if the images are disabled, they don't even show the alt-text!
I thought the missary called IE6 was over, then making a newsletter took me right back to the last century.Brrrr.

tedster

6:00 pm on Sep 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Outlook today uses the MS Word rendering engine [webmasterworld.com], rather than the IE rendering engine. That's a definite retreat in rendering capability, one that MS made for security reasons.

Although it doesn't resolve your new line issue, you may get some benefits by reading through this thread: The Challenges of HTML Email [webmasterworld.com].

carsten888

7:24 am on Sep 19, 2009 (gmt 0)

10+ Year Member



I found this page helpfull:
[reachcustomersonline.com...]

I did everything it said there and the mail shows beautifully in each mailclient I tested in, including the most difficult of all Gmail and Outlook webaccess. However they don't show alt texts when images are disabled!
So I just added a link "if you can't read this email, click here for the web-version". Really sad. The webstandard-contiousness-shift has moved dinosaurs like MS to make IE8 go webstandard, but the standards for email are still 1996!

swa66

7:52 am on Sep 19, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are quite a few very good reasons to limit what can be used in html email, both from a privacy viewpoint as from a security viewpoint.

The "word for security" argument in outlook 2007 seems IMHO like bogus and rather be about increasing the proprietary components from Microsoft over those that others can have too. Typical monopolistic behavior IMHO, esp. if you look at the crap word generates when exporting html.

For emailing html
- avoid if possible: email in text works always, and even outlook allows administrators and users to force text-only
- always send an alternate in text only
- never generate the html with word: it's humongous and doesn't fall back properly in anything but outlook/word
- minimal markup only, the simpler it is the better it will be rendered

If you want control over how things look: use pdf.

D_Blackwell

2:14 am on Sep 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



However they don't show alt texts when images are disabled!
So I just added a link "if you can't read this email, click here for the web-version".

Email is, IMO, a weaker security link than browsers. Maybe only reckless surfing is riskier. I won't allow images to show by default, don't allow preview mode, and I probably won't click for the web version even the email gets opened. HTML emails that rely on images scream spam. Anyway - If I don't recognize your domain name of if you use a lousy Subject line it will never get opened in the first place. You've got a better chance of tricking me into opening the email by not using Subject line at all because customers are often not the brightest bulbs. I need to give those a quick peek - unless there is an attachment, and it's back to instant delete. We're pretty brutal on email, and quick with the trigger, but don't think that we lose many legitimate emails.

tangor

3:26 am on Sep 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Sadly, OP, we have not answered your question on "how-to", but you have been given good advice on "why don't do it that way".

Can't give you numbers, but I suspect that a fair number of folks running email over the last few years are very leery of any HTML based emails. As D_Blackwell, my email client kills all images...and even if I recognize the sender I still don't bother to enable the images. Doubt I am the only one in that regard.

More times than not short and neat is a better way to go, particularly in this "sound-byte" era in which we live.

tedster

3:56 am on Sep 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It might be helpful to back up to examine your essential purpose, before we address line breaks at all. Here are two very different purposes:

1. Show or read some text when the user-agent does not render an image
2. Show tool-tip text when the user hovers their cursor over an image

carsten888

7:07 am on Sep 20, 2009 (gmt 0)

10+ Year Member



"Show or read some text when the user-agent does not render an image "
That would be nice, but as I said, alt text do not even show up when images are disabled. And by my knowledge there are no tags like <no images>text message</no images>

"Show tool-tip text when the user hovers their cursor over an image "
tool-tips (javascript) do not work in emails. So maybe you mean alt texts? They don't show when images are disabled.

tedster

3:57 pm on Sep 20, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The word "tooltip" describes the interface appearance. Any time information appears when hovering over an element, no matter how the effect is generated technically, that can be called a tooltip.

Through IE7 (and even IE8 in "compatibility mode") Microsoft did not follow standards - they show show alt content in a tooltip. Not so for other browsers. The W3C standard for showing a tooltip on an image hover is to use the title attribute rather than the alt attribute.

And here's where HTML email gets very tricky - instead of having just a handful of common browsers to wrestle with, in HTML email you are dealing with maybe four or five times as many common mail clients -- and email clients are incredibly non-standard in their rendering details, and also widely divergent.

Tricks such as pressing the enter key for a visual line break in the source code may work only in some mail clients. In others, they not only don't work but they can generate weird extra glyphs, often the hollow square, pipe or question mark. In others, it may just have no effect.

Unfortunately for your purposes, the answer is that text in a tooltip for either alt or title attribute is erratic across user agents, and especially whacked out in mail clients. That's the multi-vendor field that we have to work with.