InMotion Hosting Support Center

There may be times when you want to use HTML in your WordPress website. For example you may prefer to code a hyperlink by hand, or adjust the header sizes. In this tutorial we will show you how to view/add HTML code to a Page or Post in WordPress.

As per WordPress' official Code support page, Javascript, and other embeds such as Flash are not allowed to be added to a Page or Post in WordPress.

Here is a list of the specific HTML tags that WordPress allows: address, a, abbr, acronym, area, article, aside, b, big, blockquote, br, caption, cite, class, code, col, del, details, dd, div, dl, dt, em, figure, figcaption, footer, font, h1, h2, h3, h4, h5, h6, header, hgroup, hr, i, img, ins, kbd, li, map, ol, p, pre, q, s, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var

How to Add HTML to a Page/Post:

  1. Login to the Dashboard for WordPress.
  2. In the navigation menu click the Pages or Posts link, depending which one you want to add HTML to. In my tests I clicked Posts.
  3. Now, click the page or post that you want to edit.

  4. Click the Text tab.

    You will then see the text of the page or post and you can enter the HTML. In my Tests I am adding a Link to an email address:

  5. Click the Update button to save your changes.
    Here is view of the HTML link I added to a Post:


Congratulations, now you know how to add HTML to a WordPress Page or Post!

n/a Points
2016-07-25 8:54 am

Thanks

n/a Points
2016-07-31 3:08 am

Just followed the steps, and added Badge for Blogger Network HTML code to my site, Thank you!

n/a Points
2016-08-21 10:07 pm

you save this old OLD guy ass. thanks guys

n/a Points
2016-11-11 6:27 am

Wow! More than I could've hoped for.  A simple, straightforward idiots guide! Thank you, thank you, thank you.

Staff
545 Points
2016-11-11 10:01 am
OKOactive, I'm glad our article was of assistance, and you're most welcome. Have a great day!
n/a Points
2016-08-27 6:22 am
How can i insert preload animation in my wordpress blog please reply.
Staff
40,710 Points
2016-08-29 3:18 pm
Are you talking about an animated gif? It would be added the same, with an img reference.
n/a Points
2016-08-29 2:02 am

how to add image html code ??

Staff
40,710 Points
2016-08-29 3:19 pm
Just the same as above, using an img tag.
n/a Points
2016-09-16 10:27 am

Thank you very much. You just brought me from going crazy mode to now I get it mode. Wonderful.

 

 

n/a Points
2016-09-19 4:23 pm

I need to add code to the header area of my web site. I have no idea where to see that as it is not on the page I want to add some code to.

Can you tell me where I can edit the header?

Thanks in advance.

n/a Points
2016-09-19 6:54 pm

I've tried adding code to the text page, but when I update it disappears.  I'm trying to add some specific spacing using a <p><p/> tag and a <br/>tag and neither of them stay when I update ???? :(

Staff
40,710 Points
2016-09-20 7:49 am
Try adding <p>$nbsp;</p> and see if that helps. <p></p> is blank and may be stripped out.
n/a Points
2016-09-26 3:38 pm

For some reason it isn't working, Why

Staff
11,901 Points
2016-09-30 11:00 am
what exactly isn't working? Can you provide more details about what you are trying to do so we can help you?
n/a Points
2016-09-30 10:58 am

Thanks. What would be sweet if you had a book of different codes like a cheat sheet that a person could refer to when they have something they want to add. 

 

Staff
11,901 Points
2016-09-30 11:01 am
That's kind of tough to do, in reference to HTML. But if there's something you're looking to do specifically we're happy to recommend a solution.
n/a Points
2016-10-10 7:25 pm

Hi I followed your steps and it isn't working. I'm trying to post a google ad sense code and it doesn't appear correctly. Can you help?

Staff
6,421 Points
2016-10-11 10:25 am
It may have something to do with the hype of code you are posting and how it appears within the content area of the post. You may want to post your code in the actual file for theme or consider installing a plugin that allows you to paste ad codes into widget areas.
n/a Points
2016-11-10 2:11 pm

Hey, I want to add a paypal Nay Now button to my woocommerce checkout page.

Any idea how I could do that? Paypal gave me an HTML code to past it ''were I want it,'' but I don't know how I could add it to the checkout page, since it's all authomatic and it only says [woocommerce_checkout]

What can I do?

Staff
26,031 Points
2016-11-10 3:33 pm
PayPal Express Checkout is available as an addon to WooCommerce. This is the easiest method for adding PayPal to Woocommerce.

Thank you,
John-Paul
n/a Points
2016-11-15 9:27 am

This is not working for me i don't know why.

Staff
11,901 Points
2016-11-15 1:20 pm
WE need more information than what you have provided. Are you getting a specific error message? Do you have an example we can see?
n/a Points
2016-11-23 10:07 am

Regardless of what I try the page only shows the actual code.  I've tried wrapping it in <pre> and <code> but when I view the page it's just html code.

Staff
35,728 Points
2016-11-23 10:49 am
Hello Doug M,

Where are you adding the code in the editor? If you're doing it on the VISUAL tab, then the code will remain as text and not be parsed by WordPress. If you're adding it in the TEXT tab of the editor, then the code will be parsed as HTML code. Please double-check this and let us know if you require further assistance.

If you have any further questions or comments, please let us know.

Regards,
Arnel C.
n/a Points
2016-11-23 11:41 am

Hi Arnel C,

Thank you for the fast reply.  I've tried both ways so it must have to do with the theme, which is GoodLayers Real Soccer.  I may have to ping them on this issue.  Have a Happy Thanksgiving!

 

Doug

 

n/a Points
2016-11-30 4:46 am

I needed to add a code from Google but can't seem to find the file that contains the HTML tags. I tried going through the index file in public html folder but didnt work. HTML/HEAD tags weren't there as well. Would you know where to find them?

Staff
35,728 Points
2016-11-30 10:03 am
Hello Maye,

If you're trying to modify your WordPress installation to add the code, then you would typically be looking for the header.php. You can easily find it by using the EDITOR option in the Appearance menu of your WordPress Administrator.

I hope this helps to answer your question, please let us know if you require any further assistance.

Regards,
Arnel C.
n/a Points
2016-11-30 6:46 pm

I can't seem to add any HTML to the Text/HTML widget, as the code only shows up as text.  The explanation on the widget says that it can take HTML, but it doesn't do anything.

 

The following is the code I am trying to add:

<script src="//z-na.amazon-********.com/widgets/onejs?MarketPlace=US&adInstanceId=ceff46da-1956-4c1b-9be8-cf30ce5ea020&storeId=bgar07-20"></script>

But it just shows up as the following instead of showing the ads:

//z-na.amazon-adsystem.com/widgets/onejs?MarketPlace=US&adInstanceId=ceff46da-1956-4c1b-9be8-cf30ce5ea020&storeId=bgar07-20

Staff
26,031 Points
2016-12-01 9:47 am
The link within quotation marks does not look like a correct path. For example, you do not typically see two slashes "//" together like that.

I recommend double checking your amazon add settings to ensure the correct link path.

Thank you,
John-Paul
n/a Points
2016-12-02 6:34 pm

Hey ,thanks a lot. I'm new in this stuff and I'm so confused but I finally find this page where is so good explained. Thank you , I wanted to give up but now I'm going to research more. 

Staff
545 Points
2016-12-02 8:59 pm
Dalia, that's so awesome! Cool folks like you encourage and inspire us to be better every day!

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

32 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!