HTML & CSS Quiz: 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 और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 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, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।