HOW TO: add HTML content to a WordPress page/post

Last modified: April 13, 2020
You are here:
Estimated reading time: 1 min

WordPress is equipped with a powerful WYSIWYG (What You See is What You Get) post and page editor that works in a similar way to a word processing application, like Microsoft Word or Google Docs. You can type text into the editor and use buttons presented on the page to format how that text appears on screen, insert images, manage spacing or layout, and so on.

However, there are times when you may need to add HTML code to your posts or pages. In this guide, we’ll show you how.

Log in to the WordPress administration dashboard and create a new post or page from the left sidebar. Enter any text or images that you wish and then place the cursor at the position in which you wish to embed your HTML code.

At the top of the page, click the Text tab.

WP-page-html-content-Text
Click on the Text tab

 

The page view switches to display the underlying HTML code used to generate your post or page.

WP-page-html-content-Display-html
Display html

 

Enter the HTML code you wish to include on the page, then click the Update button to save. Continue to switch between the Visual and Text editor tabs as required.

Note that only HTML code can be embedded on a page. Javascript, PHP, and other code cannot be run from posts or pages by default.

Was this article helpful?
Dislike 0
Views: 18
Customer Services Contact

Need Help? Send a Ticket to our 24X7 Technical Support Team

Subtitle
Subscribe Newsletter

Subscribe to Casbay Newsletter for online tips, events and latest promotion !

Copyright © 2010 – 2020 Casbay Sdn. Bhd. (1042688-D). All Rights Reserved.

All Trademarks Are The Property of Their Respective Owner.