Using tables

Photo of a rustic table

As you’ve been working on your Persepolis projects, many of you have asked about how to get images to line up in specific ways, especially to get a pair of images to line up side-by-side on a page (like I’ve done with the covers of our three primary texts on this site’s splash page). One really good way to control the layout of your pages is with tables. WordPress uses the HTML code to create tables just fine, but the post editor does not by default include a simple button to insert tables, the way that MS Word or Google Docs do.

One way to create tables, then, is to just switch to the Text tab in the top right of your post or page editor (instead of the Visual tab) and insert the HTML code manually. Here’s the w3schols tutorial page on coding tables.

A much easier method for most users is to add a plugin that opens up the range of options available in the text editor boxes for WordPress. In the “getting started” with Domain help pages on plugins, I recommend that you start by installing a plugin called WP Edit. Since I wrote that page, I’ve found another plugin that I like even better called Easy Bootstrap Shortcode, and that’s the one that used to create the tables on the front page for this site (and the accordion folds in the resources page).

Screenshot of the buttons added in the WordPress text editor by Easy Bootstrap Shortcode

Screenshot of Easy Bootstrap Shortcode buttons. (Table button highlighted.)

If you install Easy Bootstrap Shortcode, it will add a third row of buttons to your text editor. Hover over each to see what it does.

Insert tables dialog box

Insert tables dialog box

If you click the button to insert table, you’ll get a dialog box, where you can choose how big the table should be, how many rows and columns it should have, and some other styling features.

Once you’ve set your options, click the Insert Table button and the plugin will insert shortcode to your post or page that generates the table on publication.

Shortcode for table

Shortcode to insert a table

Here’s what that initial shortcode looks like for a table with a header row plus two more rows and 4 columns: If you just publish that post as is, you’ll get a table that looks like this:

Sample table

Sample table

If I want to have two images side-by-side, the easiest thing to do is to insert a simple table with only one row and two columns and replace the text with the two images.

So this:

Sample table with images

Looks like this when it’s published:

"Conference Time" by Flickr user Christian Senger

Conference Time” by Flickr user Christian Senger

A cartoon diagram of the steps for jarring potatoes which looks like it's from the 1950s. There's a stereotypical pair of women in aprons, moving through the steps and a diagram of the necessary implements at the bottom.

Housekeeping” by Flickr user Fabian Mohr.

Or here’s another table:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed iaculis nunc ligula, ac eleifend libero pellentesque nec. Integer at venenatis arcu. Quisque vel mattis purus. Aliquam erat volutpat.

A photo of a train schedule board.

Train Schedule” by Flickr user Q Family

Nulla in orci metus. Sed in ullamcorper velit. Nam ornare dapibus urna in eleifend. Quisque nec risus non leo viverra volutpat quis rhoncus est. Mauris congue risus ac nisi vestibulum viverra.

"Comments by Flickr user Judit Klein

Comments by Flickr user Judit Klein

Aliquam sodales efficitur est ut finibus. Nulla enim urna, dapibus bibendum tempor quis, condimentum eu magna. Sed ut aliquet dui, ut finibus ipsum.

A photograph of a book with post it flags stuck in its pages.

231 by Flickr user Jay Peg

"Long Tang Table" by Flickr user Jonas erian

Long Tang Table” by Flickr user Jonas erian

Nullam elementum vel ipsum quis aliquet. Vestibulum quis ultrices ipsum. Suspendisse mollis ultrices felis, eu tincidunt diam tincidunt id.

"Unclickable Link" by Flickr user quinnanya

Unclickable Link” by Flickr user quinnanya

Pellentesque ut suscipit odio, id mattis dui. Nullam congue neque finibus facilisis sodales. Nulla ultricies, purus eget efficitur iaculis, est lectus semper lectus, ullamcorper congue dolor mi molestie neque. Ut neque est, consequat scelerisque semper rhoncus, posuere eget turpis. Sed ante leo, sollicitudin eget blandit ut, molestie sed neque. Nunc euismod faucibus mi, at ullamcorper turpis laoreet pellentesque. Mauris vel erat egestas, auctor velit eget, pulvinar est. Sed congue, metus in pulvinar posuere, neque leo efficitur nisi, sed facilisis quam enim ut purus. 


(image credit: “Long Tang Table” by Flickr user Jonas Merian)

How do I use HTML to format comments on this site (& others)?

"html tattoo" by Flickr user daniello

html tattoo” by Flickr user daniello

Different themes handle commenting differently, but many themes allow users to create links and other formatting while leaving comments, but only if they know how to do so manually with HTML code. There’s often no visual editor that lets you use HTML at the push of a button, the way there is when you’re in the dashboard composing posts and pages.

When you’re leaving a comment on a post on this site, there’s a line at the bottom that lists the most frequent types of HTML and formatting that you might want to use:

You may use these HTML tags and attributes: <a href=”” title=””> <abbr title=””> <acronym title=””> <blockquote cite=””> <cite> <code> <del datetime=””> <em> <i> <q cite=””> <strike> <strong>

For each of those codes, you just surround some text with the applicable HTML tags (i.e., you have an opening tag <em> (which adds emphasis), then the text you want to be emphasized, then you close the tag so that the browser knows when to stop emphasizing </em>).

Here are examples of how each of those codes work:

<a href=” “>course homepage</a>

<abbr title=”Hypertext Markup Language”>HTML</abbr>

<acronym title=”EWP”>Emory Writing Program</acronym>

<blockquote cite=”<cite><a href=” “> </cite> “>If people never did silly things nothing intelligent would ever get done.
Ludwig Wittgenstein<blockquote>

<cite><a href=” ” ;> </cite>

<code><a href=”” ;> </a> </code>

<del datetime=”YYYY-MM-DDThh:mm:ssTZD”>This text has been deleted from the comment and there’s a time stamp to indicate when, which is not visible but is available to screen readers.</del;>



<q cite=” “>The q cite tag allows you to provide a citation that does not show up visibly, but is available to screen readers behind the scene.</q>

<strike>This text has been struck through</strike>

<strong>Guiness for strength!</strong>

And here’s how each of those different effects will look on this site when the comment is published:

course homepage


Emory Writing Program

If people never did silly things nothing intelligent would ever get done.
Ludwig Wittgenstein

<a href=" "> </a>

This text has been deleted from the comment and there’s a time stamp to indicate when, which is not visible but is available to screen readers.



The q cite tag allows you to provide a citation that does not show up visibly, but is available to screen readers behind the scene.

This text has been struck through

Guiness for strength!