HTML/HTML Advanced

HTML Block & Inline Elements

Updated on January 6, 2026
1 min read

HTML Elements (Inline & Block)

HTML elements are building blocks of a web page.

 They are mainly of two types:

  1. Block Elements
  2. Inline Elements

Block Elements

What is a Block Element?

block element:

  • Starts on a new line
  • Takes full width of the page
  • Pushes next element to next line

Easy Example

Block element is like a table or bed

 It occupies full space.

Common Block Elements

TagUse
<div>Container
<p>Paragraph
<h1> to <h6>Headings
<section>Section
<article>Article
<header>Header
<footer>Footer
<ul>, <ol>Lists

Example

<h1>This is Heading</h1>
<p>This is a paragraph</p>
<div>This is a div</div>

Each appears on new line

Inline Elements

What is an Inline Element?

An inline element:

  1. Does not start on a new line
  2. Takes only required width
  3. Stays in same line

Easy Example

Inline element is like a pen or mobile

Takes only needed space.

Common Inline Elements

TagUse
<span>Inline container
<a>Link
<img>Image
<strong>Bold
<em>Italic
<label>Form label
<input>Input field

Example

<p>This is <strong>bold</strong> text</p>
<a href="#">Click here</a>

Appears in same line

Human Body Example

HTMLHuman Body
Block elementBody
Inline elementHand, Eye

Block vs Inline (Difference)

BlockInline
New lineSame line
Full widthContent width
Can contain inlineCannot contain block

Can Inline Become Block?

Yes, using CSS:

span {
  display: block;
}

One Line Remember 

Block = full line, Inline = same line

HTML Block & Inline Elements | HTML | Learn Syntax