Note: This resource is for using HTML to make simple changes to the formatting of individual posts and pages. If you would like to make blanket changes to your theme, such as changing the font style or color, you will need the Custom Design feature, included with the WordPress.com Premium and WordPress.com Business plans.

Preformatted text

For some types of blog posts (in particular poetry), you might want more control over your line breaks and indentation than the Visual editor typically offers.

To force the editor to preserve your indents and spacing, try using the we use the <pre> tag.

For example, take the following poem:

AH, broken is the golden bowl!
The spirit flown forever!
Let the bell toll! — A saintly soul
Glides down the Stygian river!
And let the burial rite be read —
The funeral song be sung —
A dirge for the most lovely dead
That ever died so young!
And, Guy De Vere,
Hast thou no tear?
Weep now or nevermore!
See, on yon drear
And rigid bier,
Low lies thy love Lenore!

To achieve this formatting effect, you’d use the following code:

&amp;lt;pre&amp;gt;AH, broken is the golden bowl!
The spirit flown forever!
Let the bell toll! — A saintly soul
Glides down the Stygian river!
And let the burial rite be read —
The funeral song be sung —
A dirge for the most lovely dead
That ever died so young!
And, Guy De Vere,
Hast thou no tear?
Weep now or nevermore!
See, on yon drear
And rigid bier,
Low lies thy love Lenore!&amp;lt;/pre&amp;gt;

You can also apply the <pre> tag by using the dropdown style menu in the Visual editor, and choosing “Pre.”

Extra line breaks

The Visual editor leaves one blank line between each paragraph by default. If you attempt to add additional line breaks using the “enter” or “return” key, those spaces will be stripped out when you publish.

To force the editor to keep those spaces, you can add the following code in the HTML editor:

&nbsp;

You’d want to add that as many times as you want blank lines, so if you want three blank lines between two paragraphs, you’d add the following in your HTML editor:

&nbsp;
&nbsp;
&nbsp;

This is HTML for a non-breaking space. But a word of warning! If, after adding those spaces, you click back to the Visual editor before publishing or updating your post, those spaces will be stripped out again.

If you have trouble getting those spaces to stay, you can also use a bit of inline CSS to add extra line breaks.

To do this, wrap your paragraph in the following code:

<p style="padding-top:14px;">Your paragraph of text here.</p>

This tells the editor to leave 14 pixels of space above your paragraph. You can increase the number for more space or decrease it for less. You can also use “padding-bottom” rather than “padding-top” to add extra space below a paragraph instead of above it.

This looks a bit more complicated than the non-breaking space code discussed above, but it gives you more flexibility and control.

You can play with the values for width and padding to tweak your columns. This allows you to adjust the spacing between them, create columns of different widths, and make sure more columns fit your post or page in case you add them.

You can expand that for as many rows and columns as you need for your table.

You could also use a third-party service to generate HTML tables for you, which you can then paste into your HTML editor. Windows Live Writer is one program that will do this and this Table Generator website is another.

Note: Tables are best for displaying tabular data, like a simple list of names, dates or numbers. Tables are not recommended for creating a columnar page layout. We recommend using columns for that instead.