HTML & CSS クイズ: CSS Selectors

This CSS quiz checks that you can read a selector and tell which elements it matches. You will work with classes, ids, attribute selectors, descendant and child combinators, and common pseudo-classes like :hover and :nth-child().

やさしい 10問 約5分 合格ライン 80%

モードを選ぶ

ゲストとしてプレイ中です。ログインすると XP と連続記録が保存されます。

例題

第1問 / 全10問

Which selector matches every element that has the class card?

答えを見る

C. .card A dot selects by class, so .card matches any element whose class list contains card. #card selects by id, and a bare card looks for a <card> element.

このクイズの内容

  • Type, class, id and universal selectors
  • Descendant, child and sibling combinators
  • Attribute selectors like [type="email"]
  • Pseudo-classes such as :hover, :first-child and :nth-child()
  • Pseudo-elements like ::before and grouping with commas

よくある質問

アカウントは必要ですか?

いいえ、誰でも遊べます。ログインすると XP、連続記録、バッジ、履歴が保存されます。

何度でも挑戦できますか?

はい。ベストスコアが記録され、問題と選択肢は毎回シャッフルされます。