I would recommend option 2, for two main reasons:
1) An icon is more of a decoration. It does serve a function purpose, but without that icon that original context is still intact.
2) It's cleaner code. =p

Just my two cents. However, I can see the argument for putting it directly in an image, though I wouldn't go with the spacer method. That's a bit antiquated.

- Christian

On 5/11/2010 5:48 AM, Naveen Bhaskar - live wrote:
Hi,
what is the correct semantic structure for putting an icon in the website. when I checked youtube , I see the icons loaded with css to a spacer which is 1x1 size. Is that a good approach? I want to show an email id with an email icon with that. can anyone suggest me the right semantic structure .
<span class="email">
<img src="spacer.gif" alt="'>
<a href=mailto:a...@gmail.com>some_email_id</a>
</span>
or
just <a href=mailto:a...@gmail.com>some_email_id</a> and attach the icon with css background property for the anchor tag?
thanks a lot in advance.
.naveen_bhaskar
{
email : naveenbhaskar...@gmail.com <mailto:naveenbhaskar...@gmail.com>;
    yahoo : naveenbhas...@ymail.com <mailto:naveenbhas...@ymail.com>;
 }

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to