Archives

Tables – What are they for?

Some may have noticed that there is no table button in the visual editor in WordPress. This is deliberate. Tables are intended for tabular data – defined as data that is best presented in rows and columns. So each “record” shares the same “fields”. If you do not have tabular data then it is highly recommended not to use tables in your layouts.

For starters, it’s usually more accessible to people with disabilities and it is incredibly difficult to render tables properly through voice (trying to render a two dimensional entity via a one dimensional medium). It also makes sense not to hard code presentation on your site. If you use tables, you limit yourself, the next time you’ll want to change your site, you’ll have to completely recode all your tables. Whereas if you are just using the visual editor all you need to do is change a line and and presto, your done.

Also, it gives greater flexibility to users coming to your site on alternate medium. Say, someone coming on with a cellphone. If you have a site relying on tables, it’s *really* hard to deliver the site in a different layout targeting small screen. If you only use text and basic formatting it will fit whatever medium a person coming to your site is on and they can quickly find what they are looking for and not have to pan and zoom around trying to understand what is going on.

There are many different ways to lay out a page and present the same data in ways that do not use tables. If you want to have two columns of data side by side for a schedule consider the information from the left column on top of its counterpart on the right and perhaps even making what was to be the first column bold so that it is differentiated from its counterpart data.

Ultimately though, if you need to use tables for what they were designed for and display rows and columns of tabulated data then the paste from Word button is your best friend as it will clean most of Microsoft’s proprietary formatting and give you a clean place to start.

Microsoft Word

Problems

Microsoft Word is a fine word processor for producing documents to be shared or printed, with a wealth of print-based options for indexing, and producing table of contents. As a web publishing tool it is a little less than ideal and produces very messy HTML. The same applies when using OpenOffice, or other word processors.

When text is pasted it initially looks fine:

openoffice-visual

But looking at the HTML code you can see that it is full of additional tagging information.

openoffice-dirty

This could cause issues with the display of the post or page on your blog, and effect the general layout, as well. The same code above can be written a lot more cleanly using the WordPress visual editor:

openoffice-clean

Using Word Cleanly

If you decide that you still want to use Word then you should use the Word cleanup feature to remove all extraneous tags from your text. From the visual editor click on the show kitchen sinkbutton:

kitchen-sink

Then click on the paste Word button:

paste-word

A window will appear where you can insert your Word content.

word-window

When satisfied, you can then click insert and it will clean the content and insert it into your post. Note that all your formatting will be removed so any styles will need to be added in afterward.

Microsoft Word and Web Pages

Many people use Microsoft Word to build web pages; however, MS Word will introduce a lot of strange code and formatting into your content behind the scenes. The end result is that you could paste something from Word into the Page editor and things will just not look right! For that reason alone, we strongly recommend that you do not use Word for web page formatting. However, if you still need it for your workflow, WordPress does have a Word copy/paste ‘cleaner’; please see the official WordPress documentation for a complete walk-through.

Can I Restore a Page?

If you have made changes to a Page, published it, and then realized a little later “I didn’t want to do that!”, there is a WP feature called Revisions that will help. This feature saves all previous versions of a page for you and provides an easy to use restore button.

See here for more information.

Entering a Page Title

When you create a new page, you can set a title. There are no real limitations; however, due to the template structure in place, we ask that you keep it to five words or less. NOTE: that whatever title you set, will be used by WordPress to create the URL for the page.