Inline vs Block

Click the buttons to see how layout is affected by changing the display property to inline or block.

Elements which are inline by default are coloured cyan.

Elements which are block by default are coloured yellow. Block elements typically start on a new line.

This is an <h1> element

This is an <h2> element

This is a <p> element. But this bit is an <a> element.

This is a <div> element containing an image and a button.
This is a <form> for user input.