How do I mark which human language each piece of text is in (HTML, SVG, CSS), and what in rendering depends on that mark?
In HTML and SVG the language of a run is a BCP 47 tag in lang (and xml:lang in XML), inherited from the parent; the empty string means unknown. HTML and SVG both say the tag covers text-bearing attributes too. CSS cannot declare language, only read it (:lang) or override the OpenType language system; direction is a separate mechanism. In renderers that follow CSS Fonts 4, the content language is what picks language-specific glyph forms, so a handoff that drops the tag changes which glyph variants a conforming renderer may pick. This candidate states what the specifications require; no renderer was run.
In HTML and SVG the language of a run is a BCP 47 tag in lang (and xml:lang in XML), inherited from the parent; the empty string means unknown. HTML and SVG both say the tag covers text-bearing attributes too. CSS cannot declare language, only read it (:lang) or override the OpenType language system; direction is a separate mechanism. In renderers that follow CSS Fonts 4, the content language is what picks language-specific glyph forms, so a handoff that drops the tag changes which glyph variants a conforming renderer may pick. This candidate states what the specifications require; no renderer was run.
Curator qualifications: HTML/SVG lang and xml:lang (BCP 47, inherited, empty = unknown); CSS reads but cannot declare language; direction separate. All 14 excerpts located in hash-verified copies.
Evidence status: statements located in the cited sources by a correlated desk review (Claude); not executed; not independently reviewed.
Structured fields
{
"citations": [
{
"url": "https://html.spec.whatwg.org/multipage/dom.html",
"note": "candidate evidence excerpts"
},
{
"url": "https://www.w3.org/International/questions/qa-html-language-declarations",
"note": "candidate evidence excerpts"
},
{
"url": "https://www.w3.org/TR/SVG2/struct.html",
"note": "candidate evidence excerpts"
},
{
"url": "https://www.w3.org/TR/2018/REC-selectors-3-20181106/",
"note": "candidate evidence excerpts"
},
{
"url": "https://www.w3.org/TR/css-fonts-4/",
"note": "candidate evidence excerpts"
},
{
"url": "https://www.rfc-editor.org/rfc/rfc5646.txt",
"note": "candidate evidence excerpts"
}
]
}Evidence claims
- [sourced_fact] In HTML and SVG the language of a run is a BCP 47 tag in lang (and xml:lang in XML), inherited from the parent; the empty string means unknown. HTML and SVG both say the tag covers text-bearing attributes too. CSS cannot declare language, only read it (:lang) or override the OpenType language system; direction is a separate mechanism. In renderers that follow CSS Fonts 4, the content language is what picks language-specific glyph forms, so a handoff that drops the tag changes which glyph variants a conforming renderer may pick. This candidate states what the specifications require; no renderer was run. · locator: candidate evidence excerpts source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |
Linked records
- cites → https://html.spec.whatwg.org/multipage/dom.html
- cites → https://www.rfc-editor.org/rfc/rfc5646.txt
- cites → https://www.w3.org/International/questions/qa-html-language-declarations
- cites → https://www.w3.org/TR/2018/REC-selectors-3-20181106
- cites → https://www.w3.org/TR/SVG2/struct.html
- cites → https://www.w3.org/TR/css-fonts-4