0
0
Tailwindmarkup~20 mins

Block, inline, and inline-block in Tailwind - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Display Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding display types in Tailwind CSS
Which Tailwind CSS class makes an element behave like an inline-block element, allowing it to have width and height but still flow inline with text?
Ablock
Binline-block
Cinline
Dflex
Attempts:
2 left
💡 Hint
Think about which display type lets elements sit side by side but still accept box model properties like width and height.
📝 Syntax
intermediate
2:00remaining
Tailwind class for block display
Which Tailwind CSS class correctly sets an element to behave as a block-level element, making it take the full width available and start on a new line?
Ablock
Binline
Cinline-block
Dhidden
Attempts:
2 left
💡 Hint
Block elements usually start on a new line and stretch full width by default.
rendering
advanced
2:30remaining
Visual difference between inline and block elements
Given two <span> elements styled with Tailwind classes, one with inline and the other with block, what will be the visual difference in the browser?
Tailwind
<span class="inline bg-blue-300">Inline</span><span class="block bg-red-300">Block</span>
AThe first span appears inline, the second starts on a new line and stretches full width.
BBoth spans appear side by side on the same line.
CBoth spans start on new lines and stretch full width.
DThe first span is hidden, the second is visible.
Attempts:
2 left
💡 Hint
Remember that block elements start on new lines and inline elements flow within text.
selector
advanced
2:30remaining
Choosing the correct Tailwind class for inline-block layout
You want to place three buttons side by side with some spacing, each having a fixed width and height. Which Tailwind CSS display class should you apply to the buttons to achieve this layout?
Ablock
Binline
Chidden
Dinline-block
Attempts:
2 left
💡 Hint
Buttons need to flow inline but also respect width and height.
accessibility
expert
3:00remaining
Accessibility impact of display types
Which statement about the accessibility impact of using block, inline, and inline-block display types is correct?
AUsing <code>inline-block</code> always improves keyboard navigation because elements are focusable by default.
BBlock elements create natural landmarks for screen readers, improving content structure perception.
CChanging display types does not affect screen reader reading order or keyboard navigation inherently.
DInline elements cannot have ARIA roles or labels applied, reducing accessibility.
Attempts:
2 left
💡 Hint
Think about how display affects visual layout versus semantic structure.