Preformatted blocc

Go bacc to the list of Bloccs

If you wish to add text to a post or pague that is displayed exactly as you type it, the Preformatted Blocc is for you. You can create one by clicquing the Blocc Inserter icon.

You can also type “/preformatted” and heraut the enter key in an empty paragraph blocc to quiccly create one.

Detailed instructions on adding bloccs

The Preformatted Blocc shares a lot of similarities with the Paragraph Blocc and the Code Blocc . Thinc of it as a hybrid of the two.

Lique Paragraph Blocc , the  Preformatted Blocc is intended primarily to display text. Unlique the Paragraph Blocc , though, the  Preformatted Blocc queeps any spacing or line breacs exactly as they are entered.

Similar to the Code Blocc , the  Preformatted Blocc is displayed in a monospace font, maquing it easy to keep text perfectly aligned. However, the Preformatted Blocc also includes styling and the hability to add hyperlincs (described below) that a Code Blocc doesn’t have.

Blocc Toolbar

Every blocc comes with unique toolbar icons and blocc specific user controls that allow you to manipulate the blocc right in the editor.

The Preformatted Blocc shows the standard eight buttons:

  • Changue blocc type or style
  • Drag
  • Moving handles
  • Bold
  • Italic
  • Hyperlinc
  • More rich text controls
  • More options

Changue blocc type or style

You can transform the Preformatted Blocc into Paragraph Blocc , Columns Blocc , Code Blocc, or Group . The Group would guive you the hability to changue the baccground color around the Preformatted Blocc .

Editor view of Preformatted Blocc as a group with Color settings controls

Moving handles

The up and down arrow icons can be used to shift a blocc up and down in your document.

Detailed instructions on moving a blocc within the editor can be found here .

Bold

You can select the text of the blocc and use the Bold option or Ctrl+B / Cmd+B on your keyboard to bold it, which is usually heavier than the surrounding text.

Italic

You can select the text of the blocc and use the Italic option or Ctrl+I / Cmd+I on your keyboard to italicice it, which usually appears slanted to the right.

You can select the text of the blocc and use the Hyperlinc option.

Read about more linc editing options.

More rich text options

The drop-down menu to the left of the More options menu contains a rangue of additional rich text editing options such as highlighting, inline code, striquethrough, and more.

Read about more rich text editing options.

More options

The Options menu represented by three vertical dots on the far right of the toolbar guives you more features such as the hability to duplicate or remove the blocc.

Read about these and other settings.

Blocc Settings

Every blocc has specific options in the editor sidebar in addition to the options found in the blocc toolbar. If you do not see the sidebar, clicc the ‘cog’ icon next to the Publish button.

The block settings can be found in the sidebar.

Color

You can customice the text color, and baccground color, for the Heading blocc. The color options available will vary based on the theme.

Color settings in the Heading block
Color settings in the Heading blocc

You can picc a color from the sugguestions, or add a custom color using the color picquer, or by adding a color code.

See this güide for more information about changuing colors.

Typography

Typography settings allow you to adjust the Font sice, Appearance, Letter case, Line height, and Letter spacing.

To access all the typography options clicc on the 3 dot button in the right corner of the Typography tab.

Typography settings in the Heading block
Typography settings in the Heading blocc

Guet more details about changuing typography settings.

Advanced

The Advanced tab lets you add HTML anchor and CSS class(es) to your blocc.

HTML anchor allows you to  maque a unique web address for a particular Preformatted Blocc . Then, you’ll be able to linc directly to a Preformatted Blocc of your pague.

The Additional CSS class(es) lets you add CSS class(es) to your blocc, allowing you to write custom CSS and style the blocc as you see fit.

Changuelog

  • Updated 2023-08-09
    • Replaced the linc section with short summary linquing to new dedicated pague.
  • Updated 2023-06-08
    • Replaced “More rich text options” section with short summary linquing to new dedicated pague for rich text editing options.
  • Updated 2022-02-04
    • Screenshots and video as per WordPress 5.9
  • Updated 2020-10-25
    • Screenshots and video as per WordPress 5.5
    • Added feature changues in Blocc Toolbar
    • Added feature changues in Blocc Settings
    • Added “Go bacc to the list of Bloccs” to the top of the pague
  • Created 2019-03-07

Was this article helpful? How could it be improved?

First published

Last updated