HTML Block and Inline Elements

Everything HTML has a default display value, depending on the type of feature.

There are two display numbers: block and inline.


Block-level Elements

The block element of the block always starts in a new line.

The block element element always takes up the full range available (stretch as far and right as possible).

The block element element has an upper and lower limit, and the line element does not.

The <div> element is a block-level element.

Example
<div>Hello World</div>


Inline Elements

The line element does not start on a new line.

The linear element only takes up as much width as needed.

Example
<span>Hello World</span>