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!

Continued Education in Course 101: An introduction to WordPress
You are viewing Section 16: Adding HTML to a Wordpress Page/Post
Section 15: Creating a WordPress Page
n/a Points
2014-07-16 6:35 pm
when I added the html code, the html code showed up not the link.
Staff
11,186 Points
2014-07-17 2:05 pm
This can happen if you are in the visual mode instead of the text mode. Be sure to click on the Text tab before inputting your code.
n/a Points
2014-07-19 7:25 am
It is so easy i want advance
Staff
28,219 Points
2014-07-21 1:20 pm
Hello abc,

We would be happy to create more articles for in-demand topics. Please let us know if you have any particular thing you need to see.

Kindest Regards,
Scott M
n/a Points
2014-09-05 3:38 am

how can integrete html page into wordpress.

write step by step.

Staff
28,219 Points
2014-09-05 8:47 am
Hello Umang,

This article is entirely about just that. Just follow the instructions above and you should be fine. You are welcome to ask any specific questions here in the comments.

Kindest Regards,
Scott M
n/a Points
2014-10-09 2:54 am

I want to add html code inside the blog, like if i do <html>...</html>, this <html>...</html> should be printed as it is on the blog.  how do i do that?

Staff
28,219 Points
2014-10-09 8:23 am
Hello Tehreem,

If you wish for the tags to be visible, they will display as you type them if you are using the 'Visual' mode when creating a post or page. If you are in the 'Text' mode, then it assumes you want to use the code in your post and it will not display but be used for formatting. You can switch back and forth as needed while creating your pages or posts in WordPress.

Kindest Regards,
Scott M
n/a Points
2014-11-15 10:49 am

Hi Scott,

That is useful and confirms what I had suspected BUT to add Google Analytics/Webmaster tools you need to get into the 'head', not the body, from what I see only the 'body' is exposed in the text viewer...or am I missing something?

Regards

Brian

Staff
16,896 Points
2014-11-17 9:34 am
Hello Brian,

Thank you for your WordPress question. I found many posts in the WordPress forum, where they suggest using a plugin such as Google Analytics by Yoast.

Alternately, you can edit the code for your theme, and add the the Google code to the header.php. This file location may differ based on your specific theme.

Thank you,
John-Paul
n/a Points
2014-11-19 6:56 am

Hi JP,

Thanks for such a quick response. If it is not too early have a great Christmas.

 

Regards

Brian

n/a Points
2014-11-18 4:45 pm

I followed your steps and yes it should work.  It does paste in text, when I go to visual I see the blank box for my embed, then when I reload my site to view, nothing shows up.  I am pasting in text only not in visual.  I'm trying to embed a book I am recommending from Amazon. 

Staff
11,186 Points
2014-11-18 6:02 pm
To narrow down the issue, when pasting in the text view, and saving your changes without switching back to the visual editor, are your changes in place?
n/a Points
2014-12-03 2:29 am

Holle Friend I Want Some Help. My website page link show http://example.org/topics.html

Staff
16,896 Points
2014-12-03 10:24 am
Hello Masud,

Thank you for contacting us. We are happy to help, but it is not clear what you are asking.

Please provide more information on what you are trying to accomplish.

Thank you,
John-Paul
n/a Points
2015-01-07 10:58 am

We need to include the link to the dynamic seal from the BBB into our wordpress site. The BBB people have provided us with the code snippet to use -and when we add it to the page using the instructions above it doesn't work. The BBB uses a dynamic seal that includes a javascript call - how do we add this to our template?

 

Thanks

Staff
25,274 Points
2015-01-07 11:40 am
Hello Karen,

Thanks for the question. As per the tutorial above, Javascript calls are not supposed to be in the page/post, so this tutorial won't really be of help to you. However, can add the logo by using the WordPress Editor provides in the Administrator (Appearance>Editor). I would suggest adding it in a FOOTER so that it appears. This may depend on the theme that you are using. The editor lets you work directly with the code of the WordPress theme.

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

Kindest regards,
Arnel C.
n/a Points
2015-02-12 7:33 pm

I am trying to add this code into the welcome page of my wp site:

This is the code to show an audio button that I had created<html><head><script type="text/javascript">function stop() {var audioPlayer = document.getElementsByTagName("audio")[0];audioPlayer.pause();audioPlayer.currentTime = ......

Staff
16,896 Points
2015-02-13 11:56 am
Hello Terence,

Thank you for contacting us. Were you able to follow the above guide? Did you have a question, or problem we can assist you with ?

Since it seems you put the HTML of your page, I shortened it to make the page more navigable.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2015-02-13 12:12 am

Thanks,  John-Paul Briones. I agree that adding HTML code can be intimidating and confusing. But my focus is to empower my clients and readers to recognize that, often, don’t give themselves enough credit. With the proper guidance and training, it is possible to try new things. Notice, my emphasis was on the fact that the HTML was being provided to the reader. Receiving it from a reputable source, like a conference organizer, blog syndicator, publisher, etc. and putting them on a WordPress website is easier than it may seem.

n/a Points
2015-03-05 9:37 am

Hi, I'd like to know where I can edit some of the fields in this form:

http://www.williamgee.co.uk/add-directory-listing

I'd like to edit the word 'Twitter' and not sure where to go about doing this?

Thanks in advance!

Adam

Staff
16,896 Points
2015-03-05 7:38 pm
Hello Adam,

Thank you for your question. I looked at the source code (right click-->view page source - in Chrome) for your website, and noticed you are using the Contact Form 7 plugin. Here is a link to their official Documentation.

You will have to find the "Twitter" section in the code of the form, to modify it.

If you have any further questions, feel free to post them below.

Thank you,
John-Paul
n/a Points
2015-04-03 6:47 am

Hello, I am posting HTML in my wordpress site but its casuing a big gap between the top of the page and content, could you take a look and see what you think might be causing this?

The URL is 4switch.co.uk, the mortgage form HTML contains a head and body tags and scripts, could that be causing it to shift down the page?

Staff
25,274 Points
2015-04-03 2:07 pm
Hello Cat,

You can look at the generated page with Firebug or Chrome's Inspect element, then you inspect the area where you're seeing the gap. Part of the reason is that the form itself is formatted to have a large space above it. This could be a CSS issue, or something directly associated with the form's code. You will need to look at the code and identify what's causing the elements to create that gap. When I took a look at it, the form's got a big space in it and there are abunch of paragraphs inside the DIV that make up that blank space.

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

Regards,
Arnel C.
n/a Points
2015-05-25 1:42 pm

I needed to run a javascript from my Wordpress page.  I put the code in the root of my site and cslled it with a link in a wordpress page. Worked greatWhat I am doing is opening different html pages depending on the password entered. There is a Wordpress plugin to do this but I could not mke it workhttp://thecodecave.com/smart-passworded-pages-plugin/

Staff
3,669 Points
2015-05-27 12:35 am
Hello Barryt,

What happens when you put the password in? Does it load any html or page content?

Best Regards,
TJ Edens
n/a Points
2015-05-27 10:04 am

Hi TJIt just showed the HTML.  To followup on my previous message I did get the http://thecodecave.com/smart-passworded-pages-plugin/

to work once I understood what a child page was and how to create it. cheers

Barry

n/a Points
2015-06-25 5:19 pm
hi all, i am trying to make my own website what i want know{help} from you all is please tell me how can i make postion page ,lnk to my homw page i mean i have 2 pages one is home page and another is poasting paage when i poast it should show on my home page please how can i do that???
Staff
16,896 Points
2015-06-25 7:01 pm
Hello ayya,

Thank you for contacting us. Your new post should show on your homepage by default in WordPress. Please provide a link to your site, or let us know what theme you are using so we can help you test.

Thank you,
John-Paul
n/a Points
2015-06-26 7:44 am

thank youveymuch for relpying how about insted of word press { http://www.mycontactform.com/}php if i use it will be the same ro not.

And also i have another qustion that is (those who want post something on my web, smile they can not post before that they have to pay online, )

so please tell me how can i do that ???

 

thank you vey much for all the supports .

ayya

Staff
28,219 Points
2015-06-26 9:12 am
Hello Ayya,

The link you gave is to a page that is not WordPress. Are you asking how to have a WordPress portion of your site and then have the Home link point to your main website?

Kindest Regards,
Scott M
n/a Points
2015-06-26 8:18 am

Hi,I am a bit new to wordpress and i dont no how to creat pages .  How do I configure this ''home'' URL to exactly my default web address under the permalinks or elsewhere so that if visitors click on home, it will still take them to my default web address? Your help can make be difference I need.

Thank you.

Staff
28,219 Points
2015-06-26 9:14 am
Hello Ayya,

Are you asking how to have a WordPress portion of your site and then have the Home link point to your main website, which is not WordPress?

Kindest Regards,
Scott M
n/a Points
2015-07-01 6:36 am

Im trying to update a website for a local nursery. Im using a ready made theme to build it with. They want to have a seprate login page for parents where parents can log in and they can look at their childs photo everyday. I'm trying to build it on wordpress but im not sure where to start or how to do it. (Im new to wordpress)

here is a link to the old sites login page which im trying to add in to the new one.

http://www.ruislipstarsnurseries.co.uk/login/

Staff
25,274 Points
2015-07-01 11:14 am
Hello Maria,

Thanks for the question about creating a separate login page. My suggestion would be to look at the many plugins that you can obtain for FREE. Many users have the same problem, so there may be a solution already available to you. Check out WPS Hide login. You may also want to consider using Clef two-factor authentication. These would be your best solutions short of hiring a coder/developer.

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

Regards,
Arnel C.
n/a Points
2015-07-12 1:01 pm

Hi!

I have created a Post-Signature in photoshop with links to social media sites. I saved this (HTML & Images) file. I now want to insert this HTML-signature at the end of my posts, but am having trouble with it. When I open the HTML file, it opens in a new internet tab and works fine, I have tried to 'inspect element' to het the proper 'text' that I need to paste, but it is not working! Is there a way to do this?

Staff
28,219 Points
2015-07-13 2:19 pm
Hello Xandre,

I am having trouble understanding what you are doing. Is it possible for you to save the code in a text file and simply cut and paste it into your posts?

Kindest Regards,
Scott M
n/a Points
2015-07-14 5:22 pm

Thanks Scott

Do not worry, I have made an alternate plan that seems to be working well!

n/a Points
2015-07-27 10:18 am

This is very useful tutorial for every beginner of  WordPress. Thank you so much for this post. Thank you.

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.

39 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!