Are you looking to add HTML in WordPress using the Gutenberg of classic editor? Here’s a quick guide on how to do this correctly.
Adding HTML using the Gutenberg editor
Adding a new HTML block
Press the plus symbol to add a new block and simply search for HTML.
Adding HTML to an existing block
Hover over your block and click Edit as HTML, as per the screenshot above.
Adding HTML using the classic editor
To add HTML in the classic editor, simply click Text (as per the screenshot above) to be in the HTML view.
Note: often paragraph (<p>) tags don’t show in the HTML view, however, are still outputted.