Here’s a quick look at the different Formatting blocks available in the new editor for WordPress 5.0. You can watch the video or read below for examples.
Formatting blocks
Code
The Code block is for displaying code snippets, such as something written in HTML, CSS or JavaScript. Nothing fancy here, but if you want to include code snippets you can.
var donuts = 8;
Classic
The Classic block gives you all the controls that were available in the Classic WordPress editor in versions 4 and earlier.
If you’ve been using WordPress prior to version 5.x, likely the content for all of your previous posts and pages are stored inside a Classic block. You can leave them in the Classic block, or convert them to individual blocks by clicking the ellipse in the toolbar.
Custom HTML
The Custom HTML block allows you to insert custom HTML that’s not available using the other blocks, such as div tags or perhaps definition lists. This block isn’t a sophisticated code editor, so don’t expect tabs to work or automatically closing tags.
- Donuts
- A delicious thing to eat.
You can click Preview in the toolbar to preview the HTML, but I noticed that the styling doesn’t quite match what appears once you finally publish the post.
Preformatted
The Preformatted block allows you to add text that respects multiple spaces and tabs, unlike other blocks. It uses a monospaced font to maintain uniform spacing.
Here's a preformatted block. Whatever.
Pullquote
The Pullquote block is similar to the Quote block, but allows some more visual customization, such as the colors and style.
I’m honestly not sure why the Pullquote and Quote blocks aren’t combined, but I can see the reasons for the different styling options.
Table
The Table block allows you to insert tables without the use of an additional plugin or editing HTML by hand.
1 | 2 |
2 | 4 |
The customization options are limited: you can have stripes or not, and have fixed-width cells. But you can add tables quite easily.
Verse
The Verse block is a strange combination of the Paragraph and Preformatted blocks, where you get the style of the Paragraph block with respect to spacing like the Preformatted block.
If you use this block,
you’ll need to make sure you’re putting in manual line breaks,
otherwise the block will respect your lack of line breaks
and cause content to scroll off the screen.
This block is likely best for poetry,
song lyrics
or Bible verses
that have special spacing.