What is the CSS display?
# Web Site Writing Basics## cssdisplay
CSS display is the feature used to define the display format of each HTML Element, which affects the placement of elements (such as newline or display) and the use of space on a web page, with popular values such as block (newline, full-width space-eating), inline (not newline-up, eat space as needed), inline-block (align in one line, but define width and height), none (hide all elements, do not eat space), as well as values for complex layouts like flex and grid.
Basic features of display:
Display: block;:
Require that the element be rendered like a block, with a new line every time and the full width possible.
The width, height, margin, and padding can be determined.
The inherent block-level element example is < div > or < p >.
Display: inline;:
Require an in-line display element, not a new line, and will only eat as much space as the element needs.
The width and height cannot be determined directly because they do not eat the full width.
The inherent inline-level element example is < span >, < a >, or < img >.
Display: inline-block;:
It's a combination of inline and block.
The elements are lined up on the same line like inline, but width, height, margin, and padding can be defined like block.
Display: none;:
Not only does it disappear from the screen, it will not consume any space on the page, as if it did not exist.
Display for complex layout arrangement:
In addition to the basic features, there are other values used for new layout arrangements:
Display: flex;:
It is used to create a Flexbox layout to place elements in one direction (row or column) flexibly.
Display: grid;:
It is used to create a CSS Grid layout that can control the placement of elements in both row and column axes simultaneously.
The display feature is very important in controlling the appearance and display behavior of elements on a web page, allowing us to create a website with good structure and an impressive user experience (UX).

















































































