How to Add HTML in a WordPress Blog Post

Most WordPress users spend their blogging life in the Visual Editor, the WYSIWYMG editor. Yes, it is the What You See is What You MIGHT Get editor.

While WordPress does what it can to make the Visual Editor emulate what your content will look like once published within your WordPress Theme, it has limits.

One of the limits is that is appears hard to publish HTML in a blog post. It isn’t. You just need to switch to the HTML or Text Editor on the Post/Page Panel.

Before you can publish code on your WordPress blog, there are some things you must know.

  1. WordPress automatically fixes poorly formed code. If you mess up a link or HTML element, WordPress doesn’t recognize it as properly formed code so it will “fix” it for you by replacing < with &lt; or change other code to make it appear as text.
  2. WordPress automatically strips out unwanted or broken code. If you are on , you are not permitted to publish JavaScript, PHP, or other code within your blog posts or elsewhere. But you can publish HTML if you have written it properly in the HTML/Text Editor.
  3. The WordPress Visual Editor expects everything within it to be publishable text or a shortcode, code that displays video and other media or features.
  4. The WordPress HTML/Text Editor expects everything within it to be HTML or something WordPress can use to generate HTML.
  5. WordPress recently changed the name of the HTML editor to Text editor in WordPress.com. This change may be in an upcoming release of WordPress.

There are 66 HTML codes permitted in WordPress posts, Pages, and widgets, codes you can use to make lists, links, blockquotes, images, headings, whatever content you wish to add to your site.

WordPress Page or Post Visual and HTML or Text Editor.

To write in HTML in a WordPress site:

  1. In the Post or Page panel, switch to the HTML/Text Editor.
  2. Move your cursor to the spot where you wish to add the HTML.
  3. Paste or type the HTML in. Triple check to make sure you have it written properly.
  4. Save the draft, publish, or switch back to the Visual Editor to continue.

Here are more articles and information you can use on learning how to blog in HTML or use HTML in WordPress.

About these ads

13 thoughts on “How to Add HTML in a WordPress Blog Post

  1. Pingback: Changing Blog Appearance « Pixeled Paper Designs

  2. Pingback: Happy Holidays and Onward! « Lorelle on WordPress

  3. Pingback: Family History Blogging Resources and Tips | Learning from Lorelle

    • Depends upon where you are putting the HTML. HTML is HTML and never needs to be “in” something special such as brackets. If you are putting the HTML in a blog post, just type it in the TEXT/HTML Editor not the WYSIWYG Visual Editor. If you are adding it to a Text Widget, just paste or write it in. Information on where to put it is in the article, so please be more specific with where you wish to put the HTML so I may help you set it right. Thanks.

  4. I’ve been trying all day to post a code from Stylesaint but t just won’t let me, and I now understand it is because it’s a javascript code.
    This is really stupid because the whole point of making the stylebook at Stylesaint, is to publish it at my blog;(
    it works like a charm at Tumblr so I don’t get why they haven’t made it possible to do in WordPress.

    • Code such as JavaScript has the potential of doing more harm than good. WordPress.com is a shared publishing experience. That little innincent piece if code could unwittingly infect ir break thousands or more sites.

      If you wish to publish code freely, such as ads, you may pay for hosting and use the self-hosted version of WordPress.

      • Thanks for the reply:)
        It was only a lookbook with images I had made at another web site that I wanted to also share on my blog:)
        But I ended up sharing the link to it so it will have to do:)

  5. Hi Lorelle, kinda new to wordpress n I want to have a static page as home page and other pages to have a blog like look. How do i go about it pls.
    Thanks

  6. Pingback: Blog Exercises: Don’t Let Your Content Compete With Itself « Lorelle on WordPress

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s