
For example, the following sets the default language to French: served as text/html), use the lang attribute to set the language of theĭocument or a range of text. For help in choosing the right language tag out of the many possible tags and combinations, see Choosing a language tag. To find relevant codes you should consult the IANA Language Subtag Registry.Īn unofficial Language Subtag Lookup tool provides a user-friendly front-end tool to the IANA registry.įor a gentle but fairly thorough introduction to the syntax of BCP 47 tags, read Language
Anr telugu how to#
How to compose language tags that allow you specify regional dialects, scripts and other variants related to that language.īCP 47 incorporates, but goes beyond, the ISO sets of language and country codes. In addition to specifying how to use simple language tags, such as en for English or fr for French, BCP 47 describes The rules for creating language attribute values are described by an IETF specification called BCP 47. You also need to consider how to refer in a standard way to dialectal differences between languages, such as the difference between US English andīritish English, which diverge significantly in terms of spelling and pronunciation. To be sure that all user agents recognize which language you mean, you need to follow a standard approach when providing language attribute values. You'd say that in Chinese as 中国科学院文献情报中心. If you want to specify the language of some content but there is no markup around it, use an element such as span, bdi or div around the content. Instead, move the attribute containing text in a different language to another element, as shown in this example, where the a element inherits the default en setting of the html element.Įspañol What if there's no element to hang your attribute on? For more information see the companion article, HTTP headers, meta elements and language information. Whether or not you use the HTTP header, you should always declare the language of the text in a page using a language attribute on the html tag. You should never use a meta element with the http-equiv attribute set to Content-Language to indicate the language of a page, but in certain circumstances you may want to serve language information with the HTTP header to indicate the intended audience of your page. Use nested elements to take care of content and attribute values on the same element that are in different languages.

There is no good solution for this at the moment. The same goes for multiple languages in attribute values. If you have multilingual text in the title element, you cannot mark up parts of the text for different languages because the title attribute only allows characters – no markup.
Anr telugu code#
In some parts of your code you may have a problem. You can find subtags using the unofficial Language Subtag Lookup tool. Use language tags from the IANA Language Subtag Registry.

(For pages served as XML, including XHTML 1.x and HTML5 polyglot documents, see Choosing the right attribute.) Use the lang attribute for pages served as HTML. This allows you to style or process it differently. When the page contains content in another language, add a language attribute to an element surrounding that content. Note that you should use the html element rather than the body element, since the body element doesn't cover the text inside the document's head element. Quick answerĪlways use a language attribute on the html tag to declare the default language of the text in the page. It begins with an overall summary, then provides additional details in subsequent sections. This page describes how to mark up an HTML page so that it gives information about the language of the page. How should I set the language of the content in my HTML page?
