Suchergebnisse
Suchergebnisse:
The lang attribute specifies the language of the element's content. Common examples are "en" for English, "es" for Spanish, "fr" for French and so on.
- Overview
- Try it
- Language tag syntax
- Accessibility concerns
- Browser compatibility
- See also
The lang global attribute helps define the language of an element: the language that non-editable elements are written in, or the language that the editable elements should be written in by the user. The attribute contains a single "language tag" in the format defined in RFC 5646: Tags for Identifying Languages (also known as BCP 47).
If the attribute value is the empty string (lang=""), the language is set to unknown; if the language tag is not valid according to BCP47, it is set to invalid.
Even if the lang attribute is set, it may not be taken into account, as the xml:lang attribute has priority.
The full BCP47 syntax is in-depth enough to mark extremely specific language dialects, but most usage is much simpler.
A language tag is made of hyphen-separated language subtags, where each subtag indicates a certain property of the language. The 3 most common subtags are:
Language subtag
Required. A 2-or-3-character code that defines the basic language, typically written in all lowercase. For example, the language code for English is en, and the code for Badeshi is bdz.
Script subtag
Optional. This subtag defines the writing system used for the language, and is always 4 characters long, with the first letter capitalized. For example, French-in-Braille is fr-Brai and ja-Kana is Japanese written with the Katakana alphabet. If the language is written in a highly typical way, like English in the Latin alphabet, there is no need to use this subtag.
WCAG Success Criterion 3.1.1 requires that a page language is specified in a way which may be 'programmatically determined' (i.e. via the lang attribute).
WCAG Success Criterion 3.1.2 requires that pages with parts in different languages have the languages of those parts specified too. Again, the lang attribute is the correct mechanism for this.
The purpose of these requirements is primarily to allow assistive technologies such as screen readers to invoke the correct pronunciation.
For example, the language menu on this site (MDN) includes a lang attribute for each entry:
BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
Definition, Rechtschreibung, Synonyme und Grammatik von 'tagelang' ️ Auf Duden online nachschlagen ️ Wörterbuch der deutschen Sprache.
Always use a language attribute on the html tag to declare the default language of the text in the page. When the page contains content in another language, add a language attribute to an element surrounding that content. Use the lang attribute for pages served as HTML, and the xml:lang attribute for pages served as XML.
Wörterbuch. tagelang – Schreibung, Definition, Bedeutung, Synonyme, Beispiele. Lesezeichen zitieren/teilen ausklappen. Grammatik Adjektiv. Aussprache. Worttrennung ta-ge-lang. Wortzerlegung 1 Tag 1 lang. eWDG. Bedeutung. viele Tage dauernd. Beispiele: eine tagelange Hitzewelle. es regnete tagelang. www.openthesaurus.de ( 11/2023)
Verwenden Sie immer ein Sprachattribut im html -Tag, um die Sprache des Textes auf ihrer Seite anzugeben. Wenn die Seite Inhalt in einer weiteren Sprache enthält, fügen Sie ein Sprachattribut zu dem Element hinzu, das diesen Inhalt umschließt.
Das lang - Universalattribut legt fest, welche Sprache der Elementinhalt verwendet. Die für die Sprachcodierung erlaubten Werte wurden von der IETF im RFC 5646 festgelegt.