Welcome to WebmasterWorld Guest from 54.159.190.106

Forum Moderators: not2easy

Message Too Old, No Replies

Add image alt tag by using CSS code

   
9:41 am on Dec 5, 2011 (gmt 0)



Have there any way to add image alt tag by using CSS code? I can do it in HTML but not in CSS.
Please help me.
10:22 am on Dec 5, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



You can not influence the ALT attribute using CSS. You could perhaps add this with JavaScript, but it's not going to be particularly accessible or SE friendly. The ALT text needs to be hard coded in the HTML.
2:43 pm on Dec 6, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hi 2010_Movies, I guess my question is why are you trying to set the alt via css? Put another way, what is the coding situation that means you cannot hard-code the alt into the html?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month