Jump to content

language in html


ThatJeeves
 Share

Recommended Posts

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...