Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Part 2.6Element positioning

Part 2.6Element positioning

There are different ways elements can be displayed.

Elements can follow two formats in particular, but there are more. These display styles are a bit more CSS than HTML but by default, it is included as part of HTML.

Block

A display block, is an element that will follow a vertical structure. A block has a width of 100%, and prevents any elements being at either the left or right hand side of it. That's basically how they work.

Examples of block elements include h1, h2, h3, h4, h5, h6, p, div and hr.

This is a block element.
This is also a block element.

Inline

An inline element is one that follows after another and does not break the continious line. For instance, an inline element is one which flows horizontally. Placing an inline element in an element such as a paragraph will not make the paragraph take a new line.

Examples of inline elements include the a, img, span, input and textarea.

This is an inline element. This is also an inline element.
Feedback 👍
Comments are sent via email to me.