Deloitte interview question

What is the difference between display: block; and display: inline;

Interview Answer

Anonymous

16 Nov 2018

display: block means that the element is displayed as a block, as paragraphs. a line break happens after the element, so a block element doesn’t sit next to other element. display: inline means that the element is displayed inline, inside the current block on the same line.