<?xml version="1.0" encoding="utf-8"?>

Inline-level elements

Inline-level elements

Inline-level elements don't break the flow of text. They stay within the same line and only take up as much space as the content inside them. They don’t start on a new line. For example, <b> makes text bold and <i> makes it italic. But they don’t push the text to a new line. The rest of the content keeps flowing around them.

In contrast, block-level elements (like <div> or <p>) always start on a new line and usually take up the full width of the parent. They break the text into chunks. Inline elements don’t. They just change how a part of the line looks or behaves.

Improve your UX & Product skills with interactive courses that actually work