WordPress Block Editor – Heading Block
This tutorial is part of our series WordPress Gutenberg: The Ultimate Guide For Non-Technical WordPress Users.
- To learn more about using the WordPress block editor interface, go here: The WordPress Block Editor – Content Area
- To learn more about using blocks, see this tutorial: How To Use WordPress Block Editor Blocks
Heading Block – Description
Headings are normally used to indicate the start of a new section or topic. The Heading block lets you introduce new sections and organize content around topics to help visitors (and search engines) better understand your content structure.
How To Use The Heading Block
In this section, we’ll cover:
- How to add a Heading block to your content.
- How to edit and configure your Heading block and block settings.
- How to remove the Heading block from your content.
For more details on using blocks (e.g. how to move blocks around your content), see this tutorial: How To Use Blocks.
Adding A Heading Block
To add a Heading block:
- Type or paste in your heading.
- Use the tools in the Heading Block Editor or Block Settings section to edit and format your heading.
Let’s go through the above steps.
First, create a new post or page or open an existing post or page and either:
Click on the Add Block tool and select a Heading block…
Or, select a Heading block using the Inserter tool in the Content Area.
Either of the above methods will add a Heading block to your content.
After adding a Heading block, simply type or paste in your heading.
Go through your post or page and select different heading levels (H1-H6) for different sections of your content.
Repeat this process for all your content headings.
- The Heading block supports all HTML heading tags (H1 – H6).
- The Heading block also supports HTML Anchors (also referred to as Jump Links – see further below).
- By default, heading styles are determined by your site’s theme. you can also customize heading styles if you have knowledge of using CSS (Cascading Style Sheets).
After adding headings to your content:
- Edit and configure Heading block settings,
- Save, publish, or update your post or page.
How To Edit A Heading Block
To edit a Heading block:
- Click inside the Heading block to select it.
- Use the Block Editor tools to:
- Change the heading Level (H1 – H6)
- Change the heading alignment (left, center, right)
- Format the text (bold, italics, strikethrough, etc.)
- Add a hyperlink or jump link to your heading.
- Use the Block Settings to:
- Change the heading’s typography (font size and line height).
- Change the heading’s color settings (text color, background color).
- Create an HTML anchor (see further below) or style your heading using CSS.
Let’s go through some of the editing functions of the Heading block.
After adding a heading using the Heading block, you can change its text or background color.
You can also change the size of the font and line spacing in the Typography section. Click the ‘Reset’ button to return your heading to its default setting.
An HTML anchor lets you add “jump links” in your content pointing to different sections of your page (e.g. like in a Table of Contents).
To create an HTML anchor:
- Click inside the Heading block of the section you want visitors to jump to when they click on an anchor link.
- In the Advanced Settings > HTML Anchor section of the Heading block settings, type in a unique anchor by entering one or two words without spaces (you can use hyphens to separate words).
For example, in the screenshot below we have created an HTML anchor using the text ‘main-title‘…
The next step is to connect the anchor you’ve added in your Heading block to your page.
To do this:
- Select and highlight text in your content and click on the Hyperlink tool in the Heading block editor.
- Add the anchor name into the URL field preceded by a ‘hash’ symbol (#). In our example, this is ‘#main-title‘ (without the quote symbols).
- Make sure your anchor text matches the one created in the block’s advanced settings section.
- Click the Enter button to create the link.
- Save and publish or update your post or page.
Now, when users click on the text containing your Anchor link, they will be taken to the section of the page you have marked with an HTML anchor.
For more information about linking content on your site, see this tutorial: How To Link Content In WordPress
Remember to update and publish your post or page to save your settings.
How To Remove A Heading Block
To delete or remove a heading block:
- Click inside the Heading block to select it.
- Select the ‘More Options’ tool in the Block Editor.
- Click on ‘Remove block’.
- This will remove the Heading block from your content.
- You can reposition your block using the ‘Move Up’ and ‘Move Down’ arrows or the Drag and Drop handle tool (if you need help with this step, see our tutorial on How To Use Blocks).
- You can also convert a Heading block into a Reusable block.
Heading Block Tools, Options & Settings
The Heading Block includes tools, options, and settings for:
- Heading Block Editor
- Heading Block Settings
Heading Block Editor
The Heading Block Editor includes tools that let you perform the following operations:
- Change Block Type (See ‘Heading Block – Additional Info’ section below.)
- Drag & Drop Tool
- Move Up and Down Tool
- Change Heading Level
- Change Alignment
- Align text left
- Align text center
- Align text right
- Bold – Add bold text formatting to your file’s link text.
- Italic – Add italicized text formatting to your file’s link text.
- More Rich Text Controls – See How To Use Blocks to learn more about using rich text control settings.
- Link Tool – Link and unlink your heading.
- Paste the link URL.
- Type to search and link to existing content.
- Hit ‘Enter’ or click ‘Apply’ button to create the link.
- Option to open link in new tab.
- More Options – See How To Use Blocks to learn how to use this section.
Heading Block Settings
Heading Block settings include:
- Block description area
- Font Size
- Custom font size
- Value field – Enter a value in points
- Reset – Resets font size to default.
- Line height – Enter a line height value (decimal values allowed, e.g. 2.5)
- Font Size
- Color Settings – Select from the preset color palette or add a custom color using hexadecimal or RGB values. Click the Reset button to restore the default text color.
- Text color
- Background color (Solid/Gradient)
- Advanced Settings
- HTML Anchor – Create a unique web address to send users directly to a section of your page using a unique jump link URL. To learn more about using HTML Anchors, see our tutorial on How To Use Blocks.
- Additional CSS Class(es) – This field lets you add multiple CSS classes to your block separated with spaces. This allows you to write custom CSS and style the block as you see fit. Note: This requires having knowledge of CSS (Cascading Style Sheets).
Heading Block – Additional Info
You can convert a Heading block into the following block types:
Congratulations! Now you know how to use the WordPress content editor’s Heading block.
To learn how to use other blocks, go here: WordPress Block Editor – How To Use Blocks
"I am beyond impressed with what you have put together. I can tell that you put a ton of hard work into building what you have. You have the absolute best content on WordPress I have ever seen!" - Robert T. Jillie
We are not affiliated, associated, sponsored, or endorsed by WordPress or its parent company Automattic. This site contains affiliate links to products. We may receive a commission for purchases made through these links.