How to Add Custom HTML in WordPress Page or Post

Estimated reading: 1 minute 238 views

Sometimes we need to add some HTML code to the page or post section. Then how could you do that? If you are using the Gutenberg Editor, then click on the Component Dropdown Menu from the top right corner.

Select Code Editor or you can use Ctrl + Shift + Alt + M as a keyboard shortcut.

Now you can see the Code Editor view where you can add your custom HTML code. Below I have an example added like this:

<p class="highlight-text">This paragraph has highlighted texts.</p>

Now we need to know how to add some custom CSS code to change the look below.

This paragraph has highlighted texts.

I hope this post will help beginners who are trying to make changes using WordPress.

Share this Doc