8. display: block, inline and none
इस लेख का अनुवाद अपने आप होगा। अभी अंग्रेज़ी में दिखाया जा रहा है।
display controls how an element takes space. block elements start on a new line and fill the width. inline elements sit in the text line and take only their content width. display: none removes the element from the page entirely.
Changing display is one of the most common layout tools.
उदाहरण देखें
span {
display: block;
}
.hidden {
display: none;
}
✍️ अब आपकी बारी
Make the .badge class display inline-block with padding of 4px.