0
0
CSSmarkup~5 mins

Display property in CSS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the CSS display property control?
The display property controls how an element is shown on the page, such as whether it behaves like a block, inline, or is hidden.
Click to reveal answer
beginner
What is the difference between display: block; and display: inline;?
display: block; makes the element take the full width and start on a new line. display: inline; makes the element flow within text without starting a new line.
Click to reveal answer
beginner
What does display: none; do to an element?
It hides the element completely. The element does not take up any space on the page and is not visible.
Click to reveal answer
intermediate
Name two common values of the display property used for layout.
Two common values are block and inline. Others include flex and grid for advanced layouts.
Click to reveal answer
intermediate
How does display: flex; help in web design?
display: flex; creates a flexible container that arranges child elements in a row or column, making it easier to align and space items responsively.
Click to reveal answer
Which display value makes an element invisible and removes it from the page layout?
Ainline
Bhidden
Cnone
Dblock
What happens when you set display: inline; on a <div> element?
AIt behaves like inline text and does not start a new line.
BIt creates a flexible container.
CIt becomes invisible.
DIt behaves like a block element and starts on a new line.
Which display value is best for creating a flexible layout that aligns items horizontally or vertically?
Ainline
Bflex
Cblock
Dnone
If you want an element to take the full width available and start on a new line, which display value should you use?
Ablock
Binline
Cnone
Dflex
Which of these is NOT a valid display property value?
Aflex
Binline-block
Cgrid
Dhidden
Explain how the display property affects the layout of elements on a webpage.
Think about how elements behave visually and how they take space.
You got /4 concepts.
    Describe a situation where you would use display: flex; instead of display: block;.
    Consider how you arrange multiple items in a container.
    You got /4 concepts.