Block & Inline Elements: What they are and how to use them

Your websites are all made up of inline and block elements. The Complete Web Developer Course tutorials show you how to use these elements, though this post talks about some of the differences between the types of element, and where you would use each type.

An element is defined in HTML tags. A paragraph is a HTML element that is opened with a <p> tag, and closed by a </p> tag.

Emphasised text is defined by the <em> and </em> tags surrounding the text to be emphasised (typically in italics).

Though both <p> and <em> elements are text elements, there is one key difference between them.

Paragraph elements are block elements, whereas emphasis elements are inline elements.

In this post, I’ll be looking at three of the most common element types you’ll need to use, where to use them, plus a few bonus types.

Continue Reading

Andy Dunn is a web developing, photo taking, blog writing Wulfrunian based in Cambridge. He can generally be found on two wheels.