WordPress Help

Add a custom HTML block in WordPress

You can add custom HTML to your WordPress website by using the custom HTML option within the Code block.

  1. Sign in to WordPress.
  2. On the left-side menu, select Posts or Pages.
  3. Hover over the post or page you want to edit and then select Edit.
  4. At the upper-left corner, select wordpress plus icon Toggle block inserter.
  5. On the left-side menu, under Text, select Code. The code block will be added to the bottom of the post or page.
  6. Select wordpress code icon Code and then select Custom HTML.
  7. Replace Write HTML... with your HTML code snippet.
  8. (Optional) Move the cursor and then select Preview or HTML to switch between previewing and editing the code.
  9. (Optional) Select the block and then select and hold wordpress drag icon Drag to move the block around the post or page.
  10. Select Update.

After you see the Page updated notification at the lower-left corner, your custom HTML code is successfully added to your site.

More info

Share this article