ThatJeeves Posted February 18, 2011 Share Posted February 18, 2011 Hello. I'm planning on making sites in Swedish, however using the allposter.com affiliate program. The thing is, I want to add some kind of language tag for the affiliate code. The code includes an image link and a text-link. Is it ok if I wrapped the html-code within <span style="lang="en"> </span> to show that the code is in English. Does this work if the image is within the <span lang=en>? Will the <span lang="en"> show google that the image alt-text is in English as well? Link to comment Share on other sites More sharing options...
boen_robot Posted February 18, 2011 Share Posted February 18, 2011 The value of the attribute applies to the current element and its descendants. So, if you've wrapped all content with an element that has an appropriate lang attribute, yes, Google and assistive technologies will figure out everything inside the wrapper is in English.If the only thing that was in English was the alt of an image, AND there was no text around it that's in English, you can specify the lang attribute on the image itself to indicate that its alt is in English, while everything else was using the default language of the page (hopefully indicated on the "html" element). Link to comment Share on other sites More sharing options...
ThatJeeves Posted February 19, 2011 Author Share Posted February 19, 2011 Would it work if I used <p lang="en"> instead? Link to comment Share on other sites More sharing options...
boen_robot Posted February 19, 2011 Share Posted February 19, 2011 As long as all of the "p"'s contents are in English, yes. The lang attribute can be applied on any HTML element. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.