Skip to main content

I was asked once how I put tables in posts. I answered in a comment written hurriedly, and if you were not following that discussion, you never saw it. Here is a clearer explanation:

I write my HTML by hand, which gives you what you want, as long as you use the proper symbols.

This is my generic table, with the angle brackets, "<" and ">,"
replaced by square brackets, "[" and "]."

You start by declaring a table, and saying how the outline should look:
[table border="2" cellpadding="8" cellspacing="2" width="100%"]

You continue with the information. I'm assuming that you want the same number of boxes -- or "cells" in every row. You start a row with [tr][td]. "tr" is a table row; "td" is table data -- what you put in a particular row. You put "[/td][td]" for one fewer than the number of cells you want in each row -- that determines the number of columns in your table. This row has ten columns.
[tr][td] [/td][td] [/td][td] [/td][td] [/td][td] [/td][td] [/td][td] [/td][td] [/td][td] [/td][td] [/td][/tr]. You always end with [/td][/tr].

Then you copy and paste this blank row for as many rows as you want in your table -- including the headers.

Then you put the data in each cell. "td" stands for "table data." The data for each cell comes after the "[td]."

Finally, you close the whole thing out.

This is how such a table with three rows looks:

W X Y Z K a b c d V
If you cram so much information into the cells that it will not fit on the page of the guy reading it -- and some of us read on hand-held devices with narrow pages -- then the cells will have the data in two lines. I want cells to have more than one line sometimes, and I do it by putting [br] between the lines. That's standard HTML for a break -- with, of course, square brackets substituted for the angle brackets.

For tables on dKos, most of those numbers I put in don't seem to matter.

Originally posted to Frank Palmer on Tue Aug 05, 2014 at 03:55 PM PDT.

Also republished by Welcome New Users and Community Spotlight.

Your Email has been sent.
You must add at least one tag to this diary before publishing it.

Add keywords that describe this diary. Separate multiple keywords with commas.
Tagging tips - Search For Tags - Browse For Tags


More Tagging tips:

A tag is a way to search for this diary. If someone is searching for "Barack Obama," is this a diary they'd be trying to find?

Use a person's full name, without any title. Senator Obama may become President Obama, and Michelle Obama might run for office.

If your diary covers an election or elected official, use election tags, which are generally the state abbreviation followed by the office. CA-01 is the first district House seat. CA-Sen covers both senate races. NY-GOV covers the New York governor's race.

Tags do not compound: that is, "education reform" is a completely different tag from "education". A tag like "reform" alone is probably not meaningful.

Consider if one or more of these tags fits your diary: Civil Rights, Community, Congress, Culture, Economy, Education, Elections, Energy, Environment, Health Care, International, Labor, Law, Media, Meta, National Security, Science, Transportation, or White House. If your diary is specific to a state, consider adding the state (California, Texas, etc). Keep in mind, though, that there are many wonderful and important diaries that don't fit in any of these tags. Don't worry if yours doesn't.

You can add a private note to this diary when hotlisting it:
Are you sure you want to remove this diary from your hotlist?
Are you sure you want to remove your recommendation? You can only recommend a diary once, so you will not be able to re-recommend it afterwards.
Rescue this diary, and add a note:
Are you sure you want to remove this diary from Rescue?
Choose where to republish this diary. The diary will be added to the queue for that group. Publish it from the queue to make it appear.

You must be a member of a group to use this feature.

Add a quick update to your diary without changing the diary itself:
Are you sure you want to remove this diary?
(The diary will be removed from the site and returned to your drafts for further editing.)
(The diary will be removed.)
Are you sure you want to save these changes to the published diary?

Comment Preferences

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site