i

Learn HTML and CSS in 10 Days

How are Elements Displayed?

Till now, we have made ourselves well accustomed to HTML and CSS; we are now well aware of their working and the way they look like on the web page. Presently we will go somewhat deeper and be more specific about how the elements are shown on the web page and the way they are sized.

In this chapter, we are going to learn about the box model and the way it works in HTML and CSS. We will also learn a few more CSS properties, so just stay tuned and continue reading.

How are the elements displayed?

In Previous Chapter, we have discussed the difference between the block-level and the inline-level elements. Just a quick recap:

Block-level elements are elements that start from a new line, stacking one over the other, furthermore, fits itself in any available width. Block-level elements might get nested inside each other and may wrap the inline elements. Block-level elements serve large contents. 

Inline Level elements never start on a new line. They fall into the ordinary progression of a report, arranging itself one after the other, and keep up with the width of the web content. Inline elements might be nested inside each other but can't wrap up a block-level element. Inline level elements serve small contents.