---
title: "Adding HTML to a WordPress Page/Post"
description: "In this tutorial, we'll show you all the methods for viewing and adding HTML code to a Page or Post in WordPress. There may be times when you want to use HTML in your WordPress website. For example,..."
url: https://www.inmotionhosting.com/support/edu/wordpress/adding-html-wordpress/
date: 2013-05-13
modified: 2025-02-13
author: "InMotion Hosting Contributor"
image: https://www.inmotionhosting.com/support/wp-content/uploads/2013/05/html-wordpress-featured.png
categories: ["WordPress Hosting", "WordPress Tutorials"]
type: post
lang: en
---

# Adding HTML to a WordPress Page/Post

![featured image with text adding html to a wordpress post or page](https://www.inmotionhosting.com/support/wp-content/uploads/2013/05/html-wordpress-featured-1024x538.png)

In this tutorial, we’ll show you all the methods for viewing and adding HTML code to a Page or Post in WordPress. There may be times when you want to use **HTML** in your [**WordPress** website](https://www.inmotionhosting.com/wordpress-hosting). For example, you can code a hyperlink by hand or view the entire post in HTML and make several changes at once.

So, follow along as we cover the steps for the latest editor (Gutenberg) as well as the classic editor.

![How to Add HTML to Your WordPress Page or Post](https://i.ytimg.com/vi_webp/NwwKM7vLj_w/maxresdefault.webp)

*Don’t have time to read our full guide? Watch our walk-through video.*

## How to Add HTML to a Page/Post

In the latest version of the WordPress editor, there are 3 ways to add HTML to a page or post. You can [add a Custom HTML block](#custom), [edit a single block as HTML](#block), or [edit the entire page/post HTML with the code editor](#full).

### Add a Custom HTML Block

Keep in mind that if you use this option, you will not be able to switch back to the visual editor.

1. [Login to your WordPress Dashboard](https://www.inmotionhosting.com/support/edu/wordpress/logging-into-wordpress-dashboard/).
2. In the navigation menu click the **Pages** or **Posts** link, depending which one you want to add HTML to. For the purpose of this tutorial we’re modifying a Post.![Accessing the Posts Listing in WordPress](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-edit-access-posts.png)
3. Roll your mouse over the one you want to add HTML to and click the **Edit** button.![Editing a Post in WordPress](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-edit-post.png)
4. Navigate to the section you want to add HTML to and click the plus **+** button.![Add New Block to Page/Post](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-new-block.png)
5. Type **HTML** in the search box.
6. Click the **Custom HTML** option.![Selecting the Custom HTML Block](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-custom-html-block.png)
7. A new block will be created where you can add your HTML code as needed.![Adding Code to a Custom HTML Block](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-add-custom-html.png)

### Edit A Single Block as HTML

If you have an existing block WordPress allows you to switch to the code editor. You can then view and modify the HTML as needed. This is a good option if you only want to make changes to a single section of the page or post.

1. Edit a page or post in the WordPress Dashboard.
2. Click the block you want to modify.
3. Select the options link, it looks like 3 dots.![WordPress Block Options](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-block-options.png)
4. Choose the **Edit as HTML** option.![Editing Block As HTML](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-edit-as-html.png)
5. You will then see the HTML code for that block and can modify it as needed.![Using the Code Editor](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-editing-block.png)
6. If you want to switch back to the Visual editor click the block again, select **option**, then choose** Edit visually**.![Edit Page/Post Visually](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-edit-visually.png)

### Edit Full Page/Post With the Code Editor

The third option is to edit the entire page or post with HTML. This method is a quick way to make HTML changes to several sections of the page or post at the same time.

1. Edit the page or post you want to modify.
2. Click the **Options** menu on the top right of the screen. It looks like 3 vertical dots.![Edit Page Options in WordPress](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-page-options.png)
3. Choose the **Code editor** section under *Editor*. Another option is to click the **Ctrl+Shift+Alt+M** keys at the same time. ![Accessing the Page/Post Code Editor](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-access-code-editor.png)
4. Will then see the entire page/post as HTML and can add code as needed.![Full Page Code Editor in WordPress](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-code-editor.png)

## Add HTML to a Page/Post With the Classic Editor

1. Navigate to the page or post you want to modify and edit it.
2. Click the **Text** tab. You will then see the text of the page or post and you can enter the HTML. ![Accessing the Text Tab in the Classic Editor](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-classic-editor.png)
3. Add your HTML as needed.![Classic Text Editor in WordPress](https://www.inmotionhosting.com/support/wp-content/uploads/2022/03/adding-html-to-a-page-post-classic-text-editor.png)

Congratulations, now you know how to add HTML to a WordPress *Page* or *Post! *Looking for more guides? Check out our [WordPress How To Articles](https://www.inmotionhosting.com/support/edu/wordpress/wordpress-how-to-articles/)!

[![Small Business Owners Guide To WordPress](https://www.inmotionhosting.com/blog/wp-content/uploads/2020/07/WP-eBook-Cover-v2-300x245.png)](/blog/ebooks/small-business-owners-guide-to-wordpress/)

**Get our Free Step-by-Step Guide to Creating a WordPress Website**

Learn the ins and outs of creating a winning WordPress site step-by-step, from start to finish.

[Download for Free](/blog/ebooks/small-business-owners-guide-to-wordpress/)

 
