CSS Display Property

Inline Elements

do not start on a new line

and only take up as much width as necessary.

Anchor elements

MDN Web Docs on Inline Elements MDN Web Docs on Block-Level Elements

Image elements

box with text reading 200w 200h box with text reading 200w 200h

Block Elements

always start on a new line and take up the full width available.

Paragraph elements

This is a paragraph.

This is a paragraph with BOLDED TEXT.

Unordered list

display:inline

changes a block element's property to inline.

Paragraph element with display:inline

This is a paragraph.

This is a paragraph with BOLDED TEXT.

display:block

changes an inline element's property to block.

Image elements with display:block

box with height and width text box with height and width text

display:none

hides an element.

Unordered list with display:none