How to style the <alt> tag string?
Is there any way to style alt? With javascript? With pseudo attributes? eg:
<img src="foo.jpg" alt="<h1>This is the caption</h1><p>This is some text</p><p>Another text</p>" />
??
And javascript (I use the jQuery framework) does something like this?
Get value of <alt> from <img>
make value between <h1></h1> css font-size:22px; color:green;
make value between <p></p> css font-size:14px; color:black;
BTW: javascript reads the alt tag of the image and displays them on the screen .. so that this text will be displayed not only if img is not loaded.
+3
5 answers