Is there a way to style the alt? With javascript? With pseudo attributes? like this:
This is the caption&l
No, you can't nest tags inside the attribute value as you have done. However, you can use JavaScript/JQuery to extract the value into a DIV and style that.
I wrote a simple plugin to do just that, with a bit of hacking it'll do what you want I think.
Edit: What you could do (though it's a bit hacky) is to use the following in your alt attribute:
Then in whatever code you're using, you can split on the pipe character and surround each part with the appropriate tags, something like this:
var img = $('#myimg');
var alt = img.attr('alt').split('|');
var divContents = '' + alt[0] + '
' + alt[1] + '
';