Квиз по HTML & CSS: display & position

This CSS quiz checks how display and position shape the layout. You will predict which properties inline elements ignore, how display: none differs from visibility: hidden, and where relative, absolute, fixed and sticky elements are placed.

Средний 10 вопроса ~6 минуты Проходной балл: 80%

Выберите режим

Вы играете как гость: войдите, чтобы сохранить XP и серию.

Пример вопроса

Вопрос 1 из 10

How wide is the <span>?

<style>
  span { width: 300px; height: 100px; background: gold; }
</style>
<p>Some <span>short</span> text.</p>
Показать ответ

B. As wide as its text, because width and height do not apply to inline elements A <span> is display: inline by default, and non-replaced inline boxes ignore width and height. Use display: inline-block or block to size it.

Что проверяет этот квиз

  • block, inline and inline-block
  • display: none vs visibility: hidden
  • relative and absolute with the containing block
  • fixed and how transform changes it
  • sticky and why it sometimes does not stick

Частые вопросы

Нужен ли аккаунт?

Нет. Играть может любой. Войдите, чтобы сохранять XP, серию, значки и историю.

Можно пройти ещё раз?

Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.