Lesson 10 of 50
cssDisplay Property
9 mins
Course progress20%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 10 of 50
css9 mins
Keep these ideas in mind as you work through the lesson.
Controls how an element participates in layout.
display:block – occupies the full width, starts on a new line.display:inline – flows with text, width/height ignored.display:inline-block – respects width/height but stays inline.display:flex – enables Flexbox layout.display:grid – enables Grid layout.display:none – removes element from the render tree (useful for accessibility toggles).ul { list-style:none; padding:0; }
li { display:inline-block; margin-right:1rem; }