<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CSS Display]]></title><description><![CDATA[CSS Display]]></description><link>https://css-display.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 01:54:32 GMT</lastBuildDate><atom:link href="https://css-display.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Understanding CSS Display property]]></title><description><![CDATA[The CSS Display Properties :


Block

Inline

Inline-Block
These are Many Properties in CSS Display but most common properties are given below.



The HTML Elements stack perfectly on top of each other stubbornly sit side by side ?
Why We can set the...]]></description><link>https://css-display.hashnode.dev/understanding-css-display-property</link><guid isPermaLink="true">https://css-display.hashnode.dev/understanding-css-display-property</guid><category><![CDATA[css-display-inline]]></category><category><![CDATA[CSS]]></category><category><![CDATA[css display property ]]></category><category><![CDATA[inline]]></category><category><![CDATA[inline-block]]></category><category><![CDATA[CSS block]]></category><category><![CDATA[display property in css]]></category><category><![CDATA[display property]]></category><dc:creator><![CDATA[Uditya Pal]]></dc:creator><pubDate>Sun, 14 Dec 2025 19:10:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1765739260096/a4d59cd7-df7f-4e5c-bcde-af699dc2c09c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-the-css-display-properties"><strong>The CSS Display Properties :</strong></h2>
<hr />
<ul>
<li><p>Block</p>
</li>
<li><p>Inline</p>
</li>
<li><p>Inline-Block</p>
<h3 id="heading-these-are-many-properties-in-css-display-but-most-common-properties-are-given-below"><strong>These are Many Properties in CSS Display but most common properties are given below.</strong></h3>
</li>
</ul>
<hr />
<p><em>The HTML Elements stack perfectly on top of each other stubbornly sit side by side ?</em></p>
<p><em>Why We can set the width on the div, not in the span ?</em></p>
<p>Answer lies on a CSS Property: Display.</p>
<hr />
<h3 id="heading-the-block-display"><strong>The Block display :</strong></h3>
<p>The Stacker</p>
<p>let suppose a stack of building blocks, That's essentially how block-level elements behave.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0_LjkpZ6Xzu8wckrpaqtgj-8CklvcaCrwDEaYwd2iLNKC4mHWUByNhNkyACLPbcloAu0VQzWLIwpkwTWOxVaze5_htZI2faLz8ZR8GlJ1NM6Tu-5bdSAReWl-yjoPo9bZWKpkz2PDxtOPvmbC0G_DFB1XqZ8U-7KtWir5oIC-BejPFanp7ncNVnBEGug/w382-h382/Gemini_Generated_Image_prbojgprbojgprbo.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-key-characteristics"><strong>Key Characteristics :</strong></h3>
<ul>
<li><p>Always start on a new line .</p>
</li>
<li><p>Stretch across the full width of the container.</p>
</li>
<li><p>You can set their width and height.</p>
</li>
</ul>
<p>Margins and paddings on all sides are respected.</p>
<h3 id="heading-common-block-elements"><strong>Common Block elements :</strong></h3>
<p>&lt;div&gt;,&lt;p&gt;,&lt;h1&gt; to &lt;h6&gt;,&lt;ul&gt;,&lt;ol&gt;,&lt;li&gt;,&lt;from&gt;,&lt;footer&gt;,&lt;section&gt;,&lt;article&gt;</p>
<hr />
<h3 id="heading-the-inline-display"><strong>The Inline Display:</strong></h3>
<p>The Text flow.</p>
<p>The Inline elements are sit side by side &amp; flow naturally without breaking to new line.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhE3XKQ303bDIPe4bmqDq8BlqZ1pQxAw_AxcLEQfoJI9a1-1j4JXUa3CmfWc22IkFd20VC8gIsvryjIaOopQWTgemhL6DSNTXilP7lgrXH63_FtxJCHlbr_Rn4RLg_gkAocw8jF-2rYSptWlUBxXRgWsvTETDlutS1ll5ZqoIkdXVeiJmX3jO7ag9aRRbE/w373-h373/Gemini_Generated_Image_4at6ee4at6ee4at6.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-key-characteristics-1"><strong>Key Characteristics:</strong></h3>
<ul>
<li><p>Stay on the same line with other inline elements.</p>
</li>
<li><p>Take only as much space as their content need.</p>
</li>
<li><p>Width &amp; Height properties are not work on it.</p>
</li>
</ul>
<p>only left/right margins effects.</p>
<h3 id="heading-common-inline-elements-are"><strong>Common Inline Elements are :</strong></h3>
<p>&lt;span&gt;,&lt;a&gt;,&lt;strong&gt;,&lt;em&gt;,&lt;img&gt;,&lt;i&gt;,&lt;b&gt;,&lt;q&gt;.</p>
<hr />
<h3 id="heading-the-inline-block-display"><strong>The Inline-Block Display:</strong></h3>
<p>Inline block behave like a mix of Inline &amp; block they sit next to each other but still let you control size and spacing.</p>
<p><img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxXe4Cd-s1jpC9jdCeLW_kuZK3EqhL6uz5oDFqRxMRKK-Z4iY6eXdV1mPSWhdF3jGCIWKnvh667hlL1OkrAJKu-GA4BRf0_Wg2vb2rU_Ujs2MB4439hvT0IGJ7g2veTtbjzsR5VHohGFWz-hAMfNQ9baOEQq0d-YDdrj1XyBmdEm2PDkZg6o736PHhdqk/w389-h389/Gemini_Generated_Image_x6cbfmx6cbfmx6cb.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-key-characteristics-2"><strong>Key Characteristics:</strong></h3>
<ul>
<li><p>Stay on the same line (like inline ).</p>
</li>
<li><p>Only take up their content , unless you set one.</p>
</li>
<li><p>we set width &amp; height of elements (like block).</p>
</li>
</ul>
<p>Margins and Padding on all sides are respected.</p>
<h3 id="heading-common-inline-block-elements"><strong>Common Inline-block Elements:</strong></h3>
<p>&lt;img&gt;,&lt;button&gt;,&lt;input&gt;,&lt;select&gt;,&lt;textarea&gt;.</p>
]]></content:encoded></item></channel></rss>