Understanding WordPress Blocks

Browse manual On this page × Wordpress Manual WordPress Fundamentals Toggle WordPress Fundamentals section What Is WordPress? WordPress.org vs WordPress.com What Can You Build with WordPress? How WordPress Works WordPress Core, Themes, Plugins and Content Essential WordPress Terminology How to Plan a WordPress Website Domains, Hosting, DNS and HTTPS Explained How to Choose WordPress Hosting…

3 min read

  • Article
  • Beginner
  • 4 minutes read
  • Reviewed August 3, 2026

A block is a structured unit of content or interface used by the WordPress editor.

Paragraphs, headings, images, buttons, columns, navigation and query results can all be represented as blocks. Each block has a defined type, settings and saved representation, allowing WordPress to edit and render it consistently.

Blocks Replace One Large Content Field

Older editors treated most page content as one large HTML document. Blocks divide that document into identifiable components.

This provides several advantages:

  • Each component has relevant controls.
  • Layout elements can contain other blocks.
  • Themes can style block types consistently.
  • Plugins can register specialized blocks.
  • Patterns can combine blocks into reusable designs.
  • WordPress can transform compatible blocks from one type to another.

The content still forms one page, but the editor understands more about its structure.

Common Block Categories

Text blocks

Paragraph, Heading, List, Quote, Code and Table blocks represent written content.

Media blocks

Image, Gallery, Audio, Video, Cover and File blocks manage media and presentation.

Design blocks

Group, Columns, Row, Stack, Spacer and Separator blocks organize layout.

Theme blocks

Post Title, Post Content, Query Loop, Site Logo and Navigation blocks display dynamic site information and are especially important in templates.

Embedded content

Embed blocks connect supported external services, while Custom HTML provides controlled raw markup.

Block Attributes and Markup

Each block stores attributes such as text, alignment, media identifiers, colors or layout settings.

In post content, WordPress saves block markup with HTML comments that identify the block type and serialized attributes. The frontend parser uses that structure to render the result.

Some blocks save their final HTML directly. Dynamic blocks generate output on the server when the page is requested, which allows them to show current data such as recent posts or account information.

Parent and Inner Blocks

Container blocks can hold inner blocks.

A Group block may contain a heading, paragraph and buttons. A Columns block contains Column blocks, which then contain other content. The Query Loop block contains templates for each result.

Nested structures are powerful, but excessive nesting makes editing and responsive behavior harder to manage. Use the simplest structure that communicates the design.

Block Settings and Styles

Blocks can expose controls for:

  • Alignment and width.
  • Typography.
  • Colors.
  • Dimensions and spacing.
  • Borders.
  • Positioning.
  • HTML anchors.
  • Additional CSS classes.

The available controls depend on the block, active theme, WordPress version and theme.json configuration. A theme can enable or restrict options to create a more coherent design system.

Core and Custom Blocks

WordPress core includes a broad set of blocks. Plugins and themes can register additional blocks for specialized content or functionality.

Before adding a block library, evaluate:

  • Whether core blocks already solve the problem.
  • What happens if the plugin is removed.
  • Frontend asset weight.
  • Accessibility and responsive behavior.
  • Export and migration requirements.
  • Whether the block stores proprietary markup.

Block Validation

WordPress compares saved block markup with the structure expected by the current block implementation.

If they differ, the editor may report unexpected or invalid content. This can happen after manual HTML edits, block updates or theme and plugin conflicts.

Use recovery tools carefully and keep backups before resolving important content in bulk.

Good Block Practices

  • Use semantic blocks that match the content.
  • Maintain a logical heading hierarchy.
  • Prefer Group and layout blocks over arbitrary HTML wrappers.
  • Avoid unnecessary nesting.
  • Use theme styles and presets consistently.
  • Test keyboard navigation and small screens.
  • Document third-party block dependencies.
  • Convert repeated designs into patterns.

Frequently Asked Questions

Are blocks stored as separate database rows?

Normally no. Most post blocks are serialized together in the post content field, although related media and reusable entities can have their own records.

Can I use HTML inside blocks?

Some blocks support limited HTML editing, and a Custom HTML block accepts markup. Invalid or unsupported changes can break block validation.

Do blocks require a block theme?

No. The Block Editor works with classic themes. Block themes extend the same system to site templates and global design.

Continue Learning

Previous: Block Editor vs Site Editor

Next: WordPress Patterns and Synced Patterns