てきとうなメモ

本の感想とか技術メモとか

<q>要素

これは知らんかった。

q要素の引用符はブラウザが自動的に描画することになっている。

Quotation punctuation (such as quotation marks) that is quoting the contents of the element must not appear immediately before, after, or inside q elements; they will be inserted into the rendering by the user agent.

HTML Standard

lang属性はglobalな属性でレンダリングに利用される

User agents may use the element's language to determine proper processing or rendering (e.g. in the selection of appropriate fonts or pronunciations, for dictionary selection, or for the user interfaces of form controls such as date pickers).

HTML Standard

最近の話かと思ったが仕様的にはHTML4.01の頃からで、こっちの方が強めに書かれている。

User agents should render quotation marks in a language-sensitive manner (see the lang attribute). Many languages adopt different quotation styles for outer and inner (nested) quotations, which should be respected by user-agents.

Paragraphs, Lines, and Phrases

ちなみに入れ子も可能。

<q lang="ja">引用(外)<q>引用(中)</q></q>

とかくと

引用(外)引用(中)

となる