Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Display Property | CSS Course lesson | BraveProgrammer
  1. Courses
  2. /
  3. CSS Course

Lesson 10 of 50

·css

Display Property

9 mins

Course progress20%

What you'll learn

Keep these ideas in mind as you work through the lesson.

3 points
  • `display:none` also removes the element from the accessibility tree – use `visibility:hidden` if you only need visual hiding.
  • `inline-block` is a common choice for button groups and nav items.
  • `flex` and `grid` are modern layout engines; they replace most uses of `float`.

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).

Example: Inline‑block button list

ul { list-style:none; padding:0; }
li { display:inline-block; margin-right:1rem; }
Make it stickPractice what you've learned1 quiz · 6 practical tests · Optional activities from CSS CourseBrowse activities
Previous lessonUnits of MeasurementContinue to lesson 11PositioningBack to CSS Course curriculum