1. 4.14 専用要素なしの一般的語彙
      1. 4.14.1 パンくずナビゲーション
      2. 4.14.2 タグクラウド
      3. 4.14.3 会話
      4. 4.14.4 脚注
    2. 4.15 無効要素
    3. 4.16 セレクターを用いたHTML要素のマッチング
      1. 4.16.1 Case-sensitivity of the CSS 'attr()' function
      2. 4.16.2 Case-sensitivity of selectors
      3. 4.16.3 擬似クラス

4.14 専用要素なしの一般的語彙

4.14.1 パンくずナビゲーション

この仕様は、パンくずナビゲーションメニューを記述する機械可読な方法を提供しない。著者は単に段落で一連のリンクを使用するよう推奨される。nav要素は、ナビゲーションブロックであるとして、これらの段落を含むセクションをマークするために使用できる。

次の例において、現在のページは2つの経路を経由して到達できる。

<nav>
 <p>
  <a href="/">Main</a><a href="/products/">Products</a><a href="/products/dishwashers/">Dishwashers</a><a>Second hand</a>
 </p>
 <p>
  <a href="/">Main</a><a href="/second-hand/">Second hand</a><a>Dishwashers</a>
 </p>
</nav>

4.14.2 タグクラウド

この仕様は、ページのグループ(タグクラウドとも呼ばれる)に適用するキーワードのリストをマークアップするための特別な任意のマークアップを定義しない。一般に著者は、非表示およびスタイルシートを使って見栄え効果をだす明示的なインラインのカウントをもつul要素を使用してこのようなリストをマークアップする、またはSVGを使用することのいずれかを推奨される。

ここで、3つのタグは短いタグクラウドに含まれる:

<style>
.tag-cloud > li > span { display: none; }
.tag-cloud > li { display: inline; }
.tag-cloud-1 { font-size: 0.7em; }
.tag-cloud-2 { font-size: 0.9em; }
.tag-cloud-3 { font-size: 1.1em; }
.tag-cloud-4 { font-size: 1.3em; }
.tag-cloud-5 { font-size: 1.5em; }

@media speech {
  .tag-cloud > li > span { display:inline }
}
</style>
...
<ul class="tag-cloud">
 <li class="tag-cloud-4"><a title="28 instances" href="/t/apple">apple</a> <span>(popular)</span>
 <li class="tag-cloud-2"><a title="6 instances"  href="/t/kiwi">kiwi</a> <span>(rare)</span>
 <li class="tag-cloud-5"><a title="41 instances" href="/t/pear">pear</a> <span>(very popular)</span>
</ul>

それぞれのタグに関する実際の頻度は、title属性を用いて説明する。CSSスタイルシートは、異なるサイズの単語のクラウドにマークアップを変換するために提供されるが、CSSをサポートしないか視覚系でないユーザーエージェントのために、頻度によって様々なタグを分類するためにマークアップは"(popular)"または"(rare)"のような注釈を含む。したがって、すべてのユーザーが情報の恩恵を受けることが可能となる。

順序は特に重要でないので、(olよりむしろ)ul要素が使用される。リストは実際にはアルファベット順である一方で、タグの長さによって並べられる場合に同じ情報を伝えるだろう。

ページ自体に適用するタグを表すものではないため、tagrelキーワードはこれらa要素で使用されない。これらはタグ自体をリスト化するインデックスの単なる一部である。

4.14.3 会話

この仕様は、ミーティング議事録、チャット記録、脚本における対話、インスタントメッセージログ、および様々なプレーヤーが交代で談話する他の状況を満たし、会話をマークアップするための特定の要素を定義しない。

代わりに、著者はp要素や句読点を使って会話をマークアップすることを推奨する。スタイリング目的のために話者をマークする必要がある著者は、spanまたはbを使用するよう推奨される。i要素に包まれたテキストを含む段落は、ト書きをマークアップするために使用できる。

この例は、AbbotとCostelloの有名なスケッチ、Who's on firstからの抽出物を用いてこれを示す:

<p> Costello: Look, you gotta first baseman?
<p> Abbott: Certainly.
<p> Costello: Who's playing first?
<p> Abbott: That's right.
<p> Costello becomes exasperated.
<p> Costello: When you pay off the first baseman every month, who gets the money?
<p> Abbott: Every dollar of it.

次の抜粋は、インスタントメッセージの会話ログが、行ごとのUnixタイムスタンプを提供するためにdata要素を使用して、マークアップする方法を示す。タイムスタンプは、time要素が対応していない形式で提供されており、よってdata要素が(すなわち、Unixのtime_tのタイムスタンプ)代わりに使用されることに注意されたい。著者は、time要素でサポートされる日付と時刻のいずれかを使用してデータをマークアップすることを望んだが、その要素は、dataの代わりに使用されていたかもしれない。データ分析ツールがページの著者と調整することなく、明確にタイムスタンプを検出することを可能にするので、これは都合がよいかもしれない。

<p> <data value="1319898155">14:22</data> <b>egof</b> I'm not that nerdy, I've only seen 30% of the star trek episodes
<p> <data value="1319898192">14:23</data> <b>kaj</b> if you know what percentage of the star trek episodes you have seen, you are inarguably nerdy
<p> <data value="1319898200">14:23</data> <b>egof</b> it's unarguably
<p> <data value="1319898228">14:23</data> <i>* kaj blinks</i>
<p> <data value="1319898260">14:24</data> <b>kaj</b> you are not helping your case

HTMLは、グラフをマークアップするための良い方法を持たないので、ゲーム由来の対話的な会話の記述をマークアップするのはより困難である。この例は、会話の各時点での可能な応答を列挙するためにdl要素を用いて1つの可能な規則を示す。考慮すべきもう1つのオプションは、DOTファイル形式で会話を記述するものであり、文書内に配置するSVG画像として結果を出力している。[DOT]

<p> Next, you meet a fisher. You can say one of several greetings:
<dl>
 <dt> "Hello there!"
 <dd>
  <p> She responds with "Hello, how may I help you?"; you can respond with:
  <dl>
   <dt> "I would like to buy a fish."
   <dd> <p> She sells you a fish and the conversation finishes.
   <dt> "Can I borrow your boat?"
   <dd>
    <p> She is surprised and asks "What are you offering in return?".
    <dl>
     <dt> "Five gold." (if you have enough)
     <dt> "Ten gold." (if you have enough)
     <dt> "Fifteen gold." (if you have enough)
     <dd> <p> She lends you her boat. The conversation ends.
     <dt> "A fish." (if you have one)
     <dt> "A newspaper." (if you have one)
     <dt> "A pebble." (if you have one)
     <dd> <p> "No thanks", she replies. Your conversation options
     at this point are the same as they were after asking to borrow
     her boat, minus any options you've suggested before.
    </dl>
   </dd>
  </dl>
 </dd>
 <dt> "Vote for me in the next election!"
 <dd> <p> She turns away. The conversation finishes.
 <dt> "Madam, are you aware that your fish are running away?"
 <dd>
  <p> She looks at you skeptically and says "Fish cannot run, miss".
  <dl>
   <dt> "You got me!"
   <dd> <p> The fisher sighs and the conversation ends.
   <dt> "Only kidding."
   <dd> <p> "Good one!" she retorts. Your conversation options at this
   point are the same as those following "Hello there!" above.
   <dt> "Oh, then what are they doing?"
   <dd> <p> She looks at her fish, giving you an opportunity to steal
   her boat, which you do. The conversation ends.
  </dl>
 </dd>
</dl>

一部のゲームにおいて、会話はより単純である。各文字は単に、彼らがいうことを固定された行の集合を持つ。この例において、ゲームのFAQ/チュートリアルは、各文字の既知の可能な応答の一部を示す:

<section>
 <h1>Dialogue</h1>
 <p><small>Some characters repeat their lines in order each time you interact
 with them, others randomly pick from amongst their lines. Those who respond in
 order have numbered entries in the lists below.</small>
 <h2>The Shopkeeper</h2>
 <ul>
  <li>How may I help you?
  <li>Fresh apples!
  <li>A loaf of bread for madam?
 </ul>
 <h2>The pilot</h2>
 <p>Before the accident:
 <ul>
  <li>I'm about to fly out, sorry!
  <li>Sorry, I'm just waiting for flight clearance and then I'll be off!
 </ul>
 <p>After the accident:
 <ol>
  <li>I'm about to fly out, sorry!
  <li>Ok, I'm not leaving right now, my plane is being cleaned.
  <li>Ok, it's not being cleaned, it needs a minor repair first.
  <li>Ok, ok, stop bothering me!Truth is, I had a crash.
 </ol>
 <h2>Clan Leader</h2>
 <p>During the first clan meeting:
 <ul>
  <li>Hey, have you seen my daughter?I bet she's up to something nefarious again...
  <li>Nice weather we're having today, eh?
  <li>The name is Bailey, Jeff Bailey. How can I help you today?
  <li>A glass of water?Fresh from the well!
 </ul>
 <p>After the earthquake:
 <ol>
  <li>Everyone is safe in the shelter, we just have to put out the fire!
  <li>I'll go and tell the fire brigade, you keep hosing it down!
 </ol>
</section>

4.14.4 脚注

HTMLは、脚注をマークアップするための専用のメカニズムを持たない。ここで提案する選択肢がある。


短いインライン注釈の場合、title属性を使用することができる。

この例において、対話の2つの部分は、title属性を使用して脚注のようなコンテンツで注釈付けされる。

<p> <b>Customer</b>: Hello! I wish to register a complaint. Hello. Miss?
<p> <b>Shopkeeper</b>: <span title="Colloquial pronunciation of 'What do you'"
>Watcha</span> mean, miss?
<p> <b>Customer</b>: Uh, I'm sorry, I have a cold. I wish to make a complaint.
<p> <b>Shopkeeper</b>: Sorry, <span title="This is, of course, a lie.">we're
closing for lunch</span>.

不幸なことに、title属性に依存することは、多くのユーザーエージェントがこの仕様で要求されるようなアクセス可能な方法で属性を公開しないため、現在推奨されない(たとえば、ツールチップを出現させるマウスなどのポインティングデバイスが必要になり、これはモダンな携帯端末やタブレットをもつ人のような、キーボードのみのユーザーとタッチのみのユーザーを締め出す)。

title属性が使用される場合、属性をもつ要素への読者の関心を引き出すためにCSSを使用することができる。

たとえば、次のCSSは、title属性を持つ要素の下に破線を置く。

[title] { border-bottom: thin dashed; }

より長い注釈の場合、後で文書の要素を指すよう、a要素が使用されるべきである。リンクのコンテンツが角括弧内の数字であるのが慣例である。

この例において、対話における脚注は、ダイアログの下の段落にリンクする。段落は、ユーザーが脚注の場所に戻ることができるように、対話へ相互にリンクする。

<p> Announcer: Number 16: The <i>hand</i>.
<p> Interviewer: Good evening. I have with me in the studio tonight
Mr Norman St John Polevaulter, who for the past few years has been
contradicting people. Mr Polevaulter, why <em>do</em> you
contradict people?
<p> Norman: I don't. <sup><a href="#fn1" id="r1">[1]</a></sup>
<p> Interviewer: You told me you did!
...
<section>
 <p id="fn1"><a href="#r1">[1]</a> This is, naturally, a lie,
 but paradoxically if it were true he could not say so without
 contradicting the interviewer and thus making it false.</p>
</section>

サイドノートに対して、単に特定の単語や文よりもテキストのセクション全体に適用されるより長い注釈の場合、aside要素を使用すべきである。

この例では、サイドバーはそれにいくつかの文脈を与えて、対話の後に与えられる。

<p> <span class="speaker">Customer</span>: I will not buy this record, it is scratched.
<p> <span class="speaker">Shopkeeper</span>: I'm sorry?
<p> <span class="speaker">Customer</span>: I will not buy this record, it is scratched.
<p> <span class="speaker">Shopkeeper</span>: No no no, this's'a tobacconist's.
<aside>
 <p>In 1970, the British Empire lay in ruins, and foreign
 nationalists frequented the streets — many of them Hungarians
 (not the streets — the foreign nationals). Sadly, Alexander
 Yalt has been publishing incompetently-written phrase books.
</aside>

図または表について、脚注は該当figcaptionまたはcaption要素、または文の周囲に含めることができる。

この例において、表は、文に与えられる脚注を持つセルを持つ。figure要素は、表とその脚注の組み合わせを単一の凡例に与えるために使用される。

<figure>
 <figcaption>Table 1. Alternative activities for knights.</figcaption>
 <table>
  <tr>
   <th> Activity
   <th> Location
   <th> Cost
  <tr>
   <td> Dance
   <td> Wherever possible
   <td> £0<sup><a href="#fn1">1</a></sup>
  <tr>
   <td> Routines, chorus scenes<sup><a href="#fn2">2</a></sup>
   <td> Undisclosed
   <td> Undisclosed
  <tr>
   <td> Dining<sup><a href="#fn3">3</a></sup>
   <td> Camelot
   <td> Cost of ham, jam, and spam<sup><a href="#fn4">4</a></sup>
 </table>
 <p id="fn1">1. Assumed.</p>
 <p id="fn2">2. Footwork impeccable.</p>
 <p id="fn3">3. Quality described as "well".</p>
 <p id="fn4">4. A lot.</p>
</figure>

4.15 無効要素

要素は、次のいずれかである場合に実際に無効であるといわれる。

この定義は、どの要素がフォーカス可能であるか、ならびにどの要素が:enabledおよび:disabled擬似クラスと一致するかを決定するために使用される。

4.16 セレクターを用いたHTML要素のマッチング

4.16.1 Case-sensitivity of the CSS 'attr()' function

CSS Values and Units leaves the case-sensitivity of attribute names for the purpose of the 'attr()' function to be defined by the host language. [CSSVALUES]

When comparing the attribute name part of a CSS 'attr()' function to the names of namespace-less attributes on HTML elements in HTML documents, the name part of the CSS 'attr()' function must first be converted to ASCII lowercase. The same function when compared to other attributes must be compared according to its original case. In both cases, to match the values must be identical to each other (and therefore the comparison is case sensitive).

This is the same as comparing the name part of a CSS attribute selector, specified in the next section.

4.16.2 Case-sensitivity of selectors

Selectors leaves the case-sensitivity of element names, attribute names, and attribute values to be defined by the host language. [SELECTORS]

When comparing a CSS element type selector to the names of HTML elements in HTML documents, the CSS element type selector must first be converted to ASCII lowercase. The same selector when compared to other elements must be compared according to its original case. In both cases, to match the values must be identical to each other (and therefore the comparison is case sensitive).

When comparing the name part of a CSS attribute selector to the names of attributes on HTML elements in HTML documents, the name part of the CSS attribute selector must first be converted to ASCII lowercase. The same selector when compared to other attributes must be compared according to its original case. In both cases, the comparison is case-sensitive.

Attribute selectors on an HTML element in an HTML document must treat the values of attributes with the following names as ASCII case-insensitive:

For example, the selector [bgcolor="#ffffff"] will match any HTML element with a bgcolor attribute with values including #ffffff, #FFFFFF and #fffFFF. This happens even if bgcolor has no effect for a given element (e.g., div).

The selector [type=a s] will match any HTML element with a type attribute whose value is a, but not whose value is A, due to the s flag.

All other attribute values and everything else must be treated as entirely identical to each other for the purposes of selector matching. これは次を含む:

Selectors defines that ID and class selectors (such as #foo and .bar), when matched against elements in documents that are in quirks mode, will be matched in an ASCII case-insensitive manner. However, this does not apply for attribute selectors with "id" or "class" as the name part. The selector [class="foobar"] will treat its value as case-sensitive even in quirks mode.

4.16.3 擬似クラス

Pseudo-classes

HTMLと一緒に使用することができる多数の動的セレクターが存在する。このセレクターがHTML要素とマッチする場合に、このセクションは定義する。[SELECTORS] [CSSUI]

:defined

:defined

Support in all current engines.

Firefox63+Safari10+Chrome54+
Opera?Edge79+
Edge (Legacy)?Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

:defined擬似クラス は、definedである任意の要素とマッチしなければならない。

:link

:link

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera3.5+Edge79+
Edge (Legacy)12+Internet Explorer3+
Firefox Android?Safari iOS3.2+Chrome Android?WebView Android1.5+Samsung Internet?Opera Android?
:visited

:visited

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera3.5+Edge79+
Edge (Legacy)12+Internet Explorer4+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android10.1+

href属性を持つすべてのa要素、およびhref属性を持つすべてのarea要素は、:link:visitedのいずれかとマッチしなければならない。

他の仕様では、この要件の直接的な実装に適用されるプライバシーの懸念を軽減するために、これらの要素がこれら擬似クラスとどのように一致するかに関して、より具体的な規則を適用する場合がある。

:active

:active

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera5+Edge79+
Edge (Legacy)12+Internet Explorer4+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android10.1+

要素がユーザーによってアクティブにされている:active疑似クラスは要素にマッチするように定義される。

特定の要素が:active疑似クラスのみを定義する目的のためにアクティブにされているかどうかを判断するために、HTMLユーザーエージェントは、次のリストで最初の該当するエントリーを使用しなければならない。

要素がbutton要素がある場合
要素がtype属性が送信ボタンイメージボタンリセットボタンまたはボタン状態であるinput要素である場合
要素がhref属性を持つa要素である場合
要素がhref属性を持つarea要素である場合
要素がフォーカス可能である場合

要素が正式なアクティブ化状態にある場合、要素はアクティブにされている

たとえば、ユーザーがスペースバーを押すことでbutton要素を押すためにキーボードを使用している場合、要素は、要素がkeydownイベントを受信した時刻と要素がkeyupイベントを受信した時刻との間でこの擬似クラスとマッチする。

要素がbeing actively pointed atである場合

要素はアクティブにされている

要素は、ユーザーがその要素の起動動作をトリガーする意図を示し始めた時点から、ユーザーがその要素の起動動作をトリガーする意図を示すのをやめた時点、またはその要素の起動動作の実行が終了した時点のいずれか早い方までの間、正式な起動状態にあるといわれる。

要素は、ポインティングデバイスが"down"状態にある間、ユーザーがポインティングデバイスを使用して要素を示す間積極的に指摘されているといわれる(たとえば、マウスに対して、マウスボタンが押される時間とマウスブタンが離される時間の間、マルチタッチ環境における指に対して、指がディスプレイ表面に接触している間)。

Selectorsの定義によると、:activeアクティブにされている要素のフラットツリー祖先にもマッチする。[SELECTORS]

さらに、現在:activeにマッチしているlabel要素のラベル付きコントロールである要素は、:activeにもマッチする。(ただし、アクティブ化されているとはカウントされない。)

:hover

:hover

Support in all current engines.

Firefox1+Safari2+Chrome1+
Opera4+Edge79+
Edge (Legacy)12+Internet Explorer4+
Firefox Android?Safari iOS1+Chrome Android?WebView Android?Samsung Internet?Opera Android10.1+

:hover疑似クラスは、ユーザーがポインティングデバイスで要素を指定するの要素とマッチするように定義される。:hover擬似クラスのみを定義する目的では、HTMLユーザーエージェントは、ユーザーがポインティングデバイスを使用して指定する要素である場合、その要素をユーザーが 指定するものと見なさなければならない。

Selectorsの定義によると、:hover指定された要素のフラットツリー祖先にもマッチする。[SELECTORS]

さらに、現在:hoverにマッチしているlabel要素のラベル付きコントロールである要素は、:hoverにもマッチする。(ただし、指定されるとはカウントされない。)

具体的に、このような断片を考えてみる:

<p> <label for=c> <input id=a> </label> <span id=b> <input id=c> </span> </p>

ユーザーがポインティングデバイスとともにID"a"をもつ要素を指定する場合、p要素(および上記の断片で示されない要素のすべての祖先)、label要素、ID"a"をもつ要素、およびID"c"をもつ要素は:hover疑似クラスとマッチする。IDが"a"の要素は、指定されるであることによってマッチする。label要素とp要素は、Selectorsのフラットツリーの祖先に関する条件のためにマッチする。IDが"c"の要素は、ラベル付きコントロールに関する上記の追加条件を通してマッチする(つまり、そのlabel要素は、:hoverにマッチする)。しかし、ID "b"をもつ要素は:hoverとマッチしない。たとえそれが:hover.とマッチしても、そのフラットツリー子孫は指定されない。

:focus

:focus

Support in all current engines.

Firefox1+Safari1+Chrome1+
Opera7+Edge79+
Edge (Legacy)12+Internet Explorer8+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android10.1+

CSS :focus擬似クラスの目的上、次の場合に要素がフォーカスを持つ

:target

:target

Support in all current engines.

Firefox1+Safari1.3+Chrome1+
Opera9.5+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS2+Chrome Android?WebView Android2+Samsung Internet?Opera Android10.1+

CSS :target擬似クラスの目的上、Documenttarget elementsは、nullでない場合Documenttarget elementはそれを含むリストであり、nullの場合は要素を含まないリストである。[SELECTORS]

:popover-open

:popover-open

Support in all current engines.

Firefox🔰 114+Safaripreview+Chrome114+
Opera?Edge114+
Edge (Legacy)?Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

:popover-open擬似クラスは、popover属性が popover状態ではなく、popover可視性状態showingである任意のHTML要素とマッチするように定義される。

:enabled

:enabled

Support in all current engines.

Firefox1+Safari3.1+Chrome1+
Opera9+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android2+Samsung Internet?Opera Android10.1+

:enabled擬似クラスは、実際には無効になっていないbuttoninputselecttextareaoptgroupoptionfieldset要素、またはフォームに関連付けられた要素とマッチしなければならない。

:disabled

:disabled

Support in all current engines.

Firefox1+Safari3.1+Chrome1+
Opera9+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android?Safari iOS?Chrome Android?WebView Android2+Samsung Internet?Opera Android10.1+

:disabled擬似クラスは、実際に無効である任意の要素とマッチしなければならない。

:checked

:checked

Support in all current engines.

Firefox1+Safari3.1+Chrome1+
Opera9+Edge79+
Edge (Legacy)12+Internet Explorer9+
Firefox Android4+Safari iOS?Chrome Android18+WebView Android2+Samsung Internet?Opera Android10.1+

:checked擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない。

:indeterminate

:indeterminate

Support in all current engines.

Firefox2+Safari3+Chrome1+
Opera9+Edge79+
Edge (Legacy)12+Internet Explorer10+
Firefox Android?Safari iOS1+Chrome Android?WebView Android37+Samsung Internet?Opera Android10.1+

:indeterminate擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない。

:default

:default

Support in all current engines.

Firefox4+Safari5+Chrome10+
Opera10+Edge79+
Edge (Legacy)?Internet ExplorerNo
Firefox Android?Safari iOS5+Chrome Android?WebView Android37+Samsung Internet?Opera Android10.1+

:default擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない:

:placeholder-shown

:placeholder-shown擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない:

:valid

:valid

Support in all current engines.

Firefox4+Safari5+Chrome10+
Opera10+Edge79+
Edge (Legacy)12+Internet Explorer10+
Firefox Android?Safari iOS5+Chrome Android?WebView Android37+Samsung Internet?Opera Android10.1+

:valid擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない:

:invalid

:invalid

Support in all current engines.

Firefox4+Safari5+Chrome10+
Opera10+Edge79+
Edge (Legacy)12+Internet Explorer10+
Firefox Android?Safari iOS5+Chrome Android?WebView Android37+Samsung Internet?Opera Android10.1+

:invalid擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない:

:user-valid

:user-valid擬似クラス は、user validityがtrueである inputtextarea、およびselect要素とマッチしなければならない。これらの要素は、制約検証の候補であり、制約を満たさなければならない。

:user-invalid

:user-invalid擬似クラス は、user validityがtrueである inputtextarea、およびselect要素とマッチしなければならない。これらの要素は、制約検証の候補でであるが、制約を満たしてはならない。

:in-range

:in-range

Support in all current engines.

Firefox29+Safari5.1+Chrome10+
Opera11+Edge79+
Edge (Legacy)13+Internet ExplorerNo
Firefox Android16+Safari iOS?Chrome Android?WebView Android2.2+Samsung Internet1.0+Opera Android11+

:in-range擬似クラスは、制約検証の候補であり、範囲に制限がありアンダーフローに苦しまずオーバーフローに苦しまない、すべての要素とマッチしなければならない。

:out-of-range

:out-of-range

Support in all current engines.

Firefox29+Safari5.1+Chrome10+
Opera11+Edge79+
Edge (Legacy)13+Internet ExplorerNo
Firefox Android16+Safari iOS?Chrome Android?WebView Android2.2+Samsung Internet?Opera Android11+

:out-of-range擬似クラスは、制約検証の候補であり、範囲に制限がありアンダーフローに苦しむまたはオーバーフローに苦しむかのいずれかであるすべての要素とマッチしなければならない。

:required

:required

Support in all current engines.

Firefox4+Safari5+Chrome10+
Opera10+Edge79+
Edge (Legacy)12+Internet Explorer10+
Firefox Android?Safari iOS5+Chrome Android?WebView Android4.4.3+Samsung Internet?Opera Android10.1+

:required擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない:

:optional

:optional

Support in all current engines.

Firefox4+Safari5+Chrome10+
Opera10+Edge79+
Edge (Legacy)12+Internet Explorer10+
Firefox Android?Safari iOS5+Chrome Android?WebView Android37+Samsung Internet?Opera Android10.1+

:optional擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない:

:autofill

:autofill

Firefox86+Safari15+Chrome🔰 1+
Opera?Edge🔰 79+
Edge (Legacy)?Internet ExplorerNo
Firefox Android?Safari iOS15+Chrome Android?WebView Android?Samsung Internet?Opera Android?
:-webkit-autofill

:autofillおよび:-webkit-autofill疑似クラスは、 ユーザーエージェントによって自動入力されinput要素とマッチしなければならない。ユーザーが自動入力フィールドを編集した場合、これらの擬似クラスはマッチングを停止しなければならない。

そのような自動入力が発生するかもしれないひとつの方法は、autocomplete属性によるものだが、ユーザーエージェントはこの属性が含まれていなくても自動入力できる。

:read-only

:read-only

Support in all current engines.

Firefox78+Safari4+Chrome1+
Opera9+Edge79+
Edge (Legacy)13+Internet ExplorerNo
Firefox Android🔰 4+Safari iOS?Chrome Android?WebView Android37+Samsung Internet?Opera Android10.1+
:read-write

:read-write

Support in all current engines.

Firefox78+Safari4+Chrome1+
Opera9+Edge79+
Edge (Legacy)13+Internet ExplorerNo
Firefox Android🔰 4+Safari iOS?Chrome Android?WebView Android37+Samsung Internet?Opera Android10.1+

:read-write疑似クラスは、セレクターの目的のためにユーザー変更可能とみなされる、次のカテゴリーの1つに分類される任意の要素とマッチしなければならない:[SELECTORS]

:read-only擬似クラスは、他のすべてのHTML要素とマッチしなければならない。

:modal

:modal擬似クラスは、次のカテゴリーのいずれかに分類される任意の要素とマッチしなければならない:

:dir(ltr)

:dir

Firefox49+Safari16.4+ChromeNo
Opera?EdgeNo
Edge (Legacy)?Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?

:dir(ltr)擬似クラスは、書字方向が'ltr'であるすべての要素とマッチしなければならない。

:dir(rtl)

:dir(rtl)擬似クラスは、書字方向が'rtl'であるすべての要素とマッチしなければならない。

カスタム状態疑似クラス

:state(identifier)擬似クラスは、状態セットセットエントリー識別子が含まれているすべてのカスタム要素にマッチしなければならない。

:playing

:playing擬似クラスは、paused属性がfalseであるすべての メディア要素にマッチしなければならない。

:paused

:paused擬似クラスは、paused属性がtrueであるすべての メディア要素にマッチしなければならない。

:seeking

:seeking擬似クラスは、seeking属性がtrueであるすべての メディア要素にマッチしなければならない。

:buffering

:buffering疑似クラスは、paused属性がfalseであり、 networkState属性がNETWORK_LOADINGであり、かつready状態が HAVE_CURRENT_DATA以下であるすべてのメディア要素にマッチしなければならない。

:stalled

:stalled擬似クラスは、buffering疑似クラスにマッチし、is currently stalledがtrueであるすべてのメディア要素にマッチしなければならない。

:muted

:muted擬似クラスは、mutedであるすべてのメディア要素にマッチしなければならない。

:volume-locked

:volume-locked疑似クラスは、ユーザーエージェントのvolume lockedがtrueであるとき、すべてのメディア要素にマッチしなければならない。

:open

:open擬似クラスは、次のカテゴリーのいずれかに該当する任意の要素とマッチしなければならない:

この仕様では、要素が:lang()動的疑似クラスとマッチする場合を定義していない。これは、Selectorsで言語に依存しない流儀で十分に詳細に定義されるためである。[SELECTORS]