2/29/2024 0 Comments Meta definition spanishThe lang attribute is allowed by the syntax of XHTML, and may also be recognized by browsers. The xml:lang attribute is not actually useful for handling the file as HTML, but takes over from the lang attribute any time you process or serve the document as XML. Ensure that the values for both attributes are identical. The xml:lang attribute is the standard way to identify language information in XML. When serving XHTML 1.x or polyglot pages as text/html, use both the lang attribute and the xml:lang attribute together every time you want to set the language. 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 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. 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. Abundant examples of words used in context explain the shades of difference between words.How should I set the language of the content in my HTML page? Access more than 80,000 entry words and phrases and 100,000 translations. Includes extensive coverage of Latin-American Spanish. This bilingual, bidirectional guide is designed to help users communicate effectively in Spanish and English. Merriam-Webster's Spanish-English Dictionary with Audio API Product Description
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |