Gutenberg – Formatting

The “Formatting” section includes more specialised blocks used in creating pages and posts. There are seven of them (plug-ins may add more to the list) and they are:
Code, Classic Block, Custom HTML, Preformatted, Pullquote, Table and Verse


if($x==1) {
  echo "Hello World";
}

The snippet above is in the “Code” block which is designed to show pieces of code that retain spaces and tabs. There are no options with it. Here.


The rain in Spain stays mainly in the plain.

The text above is actually created in the “Classic Block”. It will not appear different on the site, only in the editing area. It allows you to use the classic editor which was in use before Gutenberg. It is useful if you have a page/post that is mainly formatted text since the headings, lists, etc, are all visible in the toolbar.


This text is bold.

The line above is actually an example of the “Custom HTML” block. The paragraph and bold setting were written in the code rather than using the editor. Normally you would use the block for HTML code that you cannot easily create normally.


This text is written in
  a monospace font    

The “Preformatted” block above is similar to the Code in that it respects spaces and tabs, while allowing formatting such as bold and italic.


The only thing necessary for the triumph of evil is for good men to do nothing.

Edmund Burke

The quotation above is within a “Pullquote” block, designed to emphasise a quotation or excerpt from the text. You can apply simple formatting to the text and change the overall appearance slightly.


ArtistBornDied
Burne-Jones, Edward18331898
Millais, John Everett18291896
Rosetti, Dante Gabriel18281882
Waterhouse, John William18491917

Above is an example of the “Table” block. There is some flexibility in how to design the table, with headers and/or footers or not, and two styles.


She left the web, she left the loom
She made three paces thro' the room
She saw the water-flower bloom,
She saw the helmet and the plume,
   She look'd down to Camelot.
Out flew the web and floated wide;
The mirror crack'd from side to side;
'The curse is come upon me,' cried
   The Lady of Shalott.

Like the code and preformatted blocks, the “Verse” block allows you to use spaces to indent lines as they would in a piece of poetry or lyrics.