Working with Tables in Plain Text

Ah, tables. They’re great for organizing and presenting information, aren’t they? On the other hand, tables can be a pain to work with — there are so many little things that can go wrong, which can break a table. That’s especially true if you’re working with tables in plain text.

Using markup languages can also add to the complexity. Depending on the markup language, it can take a bit of time to master basic tables, and a bit longer to be able to comfortably craft more complex tables.

When you need to create a plain text table, you can do it:

Let’s take a look at doing each.

By Hand

If you’re regularly creating tables, especially with a markup language, you’ve probably developed the muscle memory for creating those tables — you instinctively know the tags, you instinctively know how to space everything. If not, it’s going to take a bit of time and practice to be able to do that.

The biggest problem you’ll encounter with a plain text table — one with which you’re not using a markup language — is keeping the columns aligned. Neatly-arranged columns make your tables easier to read and easier to look at. Here’s an example:

A table with neat columns

To ensure everything lines up, you need to add spaces or tabs as you add rows, columns, and text to the table.

This isn’t as pressing a problem with tables that you create using a markup language. While your tables should be neat (in case someone else needs to edit them), what really matters is the final output. You do, however need to ensure that the markup is correct. Otherwise, your tables will break.

Using a Template

This is a good option if you infrequently use tables, and only use tables with certain layouts.

There are (at least) two options for using table templates:

First, you you can keep your templates in one or more text files somewhere handy &mdashl perhaps on your hard drive or in a note taking tool. When you need to create a table, copy and paste the template into your document and then work with it.

If your text editor has that function, you can save templates as snippets (or whatever your editor calls them) and then insert the skeleton table with a keystroke or two when you need one.

To help you get started, I’ve cobbled together these very basic templates for tables that span three columns and have three rows:

The templates are released under a CC0 public domain license. You can modify them as you see fit and use them as you need to.

Using a Table Generator

A table generator, as you’ve guessed, is a tool in which you create and output a table. The tool requires limited input from you — just add rows or columns with the click of a button and type text into the table.

Using a generator is good middle ground between creating tables by hand or using a template. And it’s a perfect solution if you only need to create a table only every so often or if you need to create a fairly complex table — for example, with rows that span multiple columns.

Here are three good online table generators:

Final Thoughts

Working with tables in plain text can be tricky. But it’s not impossible. No matter what your level of comfort with tables, there are quick and efficient ways of creating them in plain text, with or without using a markup language.