Interview Question

What is display property?

display controls an element’s generated boxes and layout mode.

💡 Concept ✅ Quick Revision 🎨 CSS

Answer

The display property defines an element’s outer and inner display types. • The outer type controls participation in surrounding flow. • The inner type controls layout of the element’s children. • Values such as none can remove the element’s generated boxes.

💡 Simple Example

.layout { display: grid; }

⚡ Quick Revision

display controls an element’s generated boxes and layout mode.