Moodle Help & Support
This refers to Moodle 3.11 from August 2022 onwards
There is a toolbar to insert pre-formatted styles from the Moodle editor toolbar.
The icon to access these styles is highlighted in the toolbar screenshot below:
When you are editing in Moodle, select the 'pre-formatted styles' icon (highlighted above) to see the formatting options.
Simply select the desired style from the drop down menu or (where indicated in the menu option) first select some text to apply a style to it.
If you have added a style box from the drop down menu, pressing enter on your keyboard inside the block adds a new identically formatted style block containing no text.
If you wish to add a line break within a style block, press shift and enter together on your keyboard to add a new line.
To remove an empty style block select 'No style' from the pre-formatted styles drop-down list. This will allow you to enter text below the style block.
It is possible to add an additional style block within an existing one. To do this, select the text you wish to appear within a sub-style and apply the desired style.
Note: It is possible to alter the font colour of the text in a style block but please consider the contrast of text and background.
The following other resources are also relevant to this topic: