{"id":14045,"date":"2011-09-05T20:40:44","date_gmt":"2011-09-06T03:40:44","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14045"},"modified":"2021-10-15T11:50:23","modified_gmt":"2021-10-15T18:50:23","slug":"display","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/d\/display\/","title":{"rendered":"display"},"content":{"rendered":"\n

Every element on a web page is a rectangular box. The display property in CSS determines just how that rectangular box behaves.<\/p>\n\n\n\n

span.icon {\n  display: inline-block;  \/* Characteristics of block, but lays out inline *\/\n}<\/code><\/pre>\n\n\n\n

The default value for all elements is inline. Most “User-Agent Stylesheets” (the default styles the browser applies to all sites) reset many elements to “block.” Let’s go through each of these, and then cover some of the other less common values.<\/p>\n\n\n

Syntax<\/h3>\n\n\n
display: [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy><\/code><\/pre>\n\n\n\n