Oftentimes you may find it helpful to edit blocks of text as HTML as you continue to edit your blog post. You can quickly make changes to the formatting and content of a block of text when you edit it as HTML. In the HTML editor, you can format text using tags, insert links, and images into the block.
You may want to change the default behavior of a WordPress block element. Therefore, you may want to go under the hood to edit a specific block as HTML for reasons not limited to the ones below:
- Adding some inline styling that is not available in your existing theme.
- Adding and styling a specific image to a paragraph in the post.
- Removing some extra list items appear on the frontend of the blog post.
In this post, I will show you how to safely edit any extra HTML codes that appear on the frontend of your post like the extra list tags below:
The WordPress Editor provides two options for editing a block as HTML:
- One option lets you click on the ellipsis, or the three dots, has an Edit as HTML option to edit the HTML. Select from the dropdown the option to Edit as HTML:
The other option lets you click on a Code Editor option under the Tools menu to edit all the HTML for the entire post or page but can ignore this option for now.
- So, to edit a block as HTML, click on the ellipsis (the three vertical dots) in the toolbar for the specific block, or by selecting the ‘Edit as HTML’ option.
While it’s possible to remove the tag by simply deleting the block with the extra tag, sometimes the only way to resolve this is to physically remove via by editing as HTML.
- Lastly, click “Edit Visually” to continue improving your post in the Block Editor until you are ready to “Save” and “Publish.”
WordPress has a great page to learn more about block editors.