Pixelbox

Welcome to Pixelbox. Friday the 5 of September 2008

Skip to content >>

Line breaks in alt and title attributes and mailto

We where having a little bit of a problem in the office today when we tried to change some automated mailto links in Flash. What we wanted to do was provide a small message followed by a link. The link needed to be on a new line, otherwise it looked quite confusing.

I remembered a while ago seeing something on the inter web about line breaks in tool tips (title attributes) by using 
.

<a href="http://this.bit.is.irrelevent.com" title="first line &#013; second line"></a>

Unfortunately this didn't create a line break in out mailto links, either in flash or HTML. After a bit more digging I found another site which claimed %0a would work! (That's a 0 not a O btw).

<a href="mailto:example@example.com?body=the message's first paragraph.%0a%0asecond paragraph.%0a%0athird paragraph.">test</a>

The only problem now is that Gmail seems to ignore them... oh well, it's better than nothing!

Meta tags: Development

There are no comments yet

Add your own comment