Make Colorful Tables in BlogSpot

blogspot tablesBlogSpot blogs are rich with options that gives you freedom to design and create whatever you want using CSS and HTML. Blogger post editor doesn't has the option of creating HTML tables but no worries we can make tables with rows and columns ourselves and not just dull grey tables, fully customized tables with background colors and smooth and neat edges and borders. This  tutorial will be divided in two parts for simplicity. The first part will give you basics of understanding the structure of tables and the second part will let you customize the tables. After reading both parts you will be able to create MS Excel type style sheets and much more.

UPDATE: Part 2 has been publish: Change Border colour and Border size of HTML Tables

Live Demo

How To Create HTML Tables For Blogger Blogs?

This is how a simple table code with 2 rows and 2 columns looks like,

<table border="1" cellspacing="0" cellpadding="2" width="400"><tbody>


   <tr>
      <td>Row 1, Column 1</td>

      <td>Row 1, Column 2</td>
    </tr>

    <tr>
      <td>Row 2, Column 1</td>

      <td>Row 2, Column 2</td>
    </tr>


  </tbody></table>

 

This code will create the following table,

Row 1, Column 1 Row 1, Column 2
Row 2, Column 1 Row 2, Column 2

Now lets understand some basics of this HTML structure:

Understanding every basic is not required for you as bloggers so I would be sharing things that may not create confusion and yet prove really helpful.

(1)  The starting and ending brown highlighted areas shows the start and end of your table structure. Where I have set border="1" and if you don't want borders then set border="0". There you can also see cellspacing and cellpadding. Just let let as it is. To set width of the table you will need to control width="400"

(2)  The tag <tr> indicates a row and tag <td> indicates a column. In the above table you can see two columns in a single row. This is because I have added two <td> tags inside <tr> and </tr> . This part of code is represented by,

<tr>
      <td>1</td>

      <td>2</td>
    </tr>

 

If you wish to add 3 columns to a single row then we would add <td> thrice ,

<tr>
      <td>Column-1</td>

      <td>Column-2</td>

       <td>Column-3</td>
    </tr>

What if you want 2 Rows and each row contains 4 columns? Here goes the complete code,

<table border="1" cellspacing="0" cellpadding="2" width="400"><tbody>

<tr>
      <td>Column-1</td>

      <td>Column-2</td>

       <td>Column-3</td>

           <td>Column-4</td>


    </tr>

<tr>
      <td>Column-1</td>

      <td>Column-2</td>

       <td>Column-3</td>

       <td>Column-4</td>


    </tr>

  </tbody></table>

Two <tr> tags because we created two rows and 4 <td> tags in each row because we want 4 columns. The result would be,

Column-1 Column-2 Column-3 Column-4
Column-1 Column-2 Column-3 Column-4

 

That's all for this post. The next post will take you a level further in letting you understand how to add backgrounds to each table cell and I am sure you will like it more.

You will also like,

Related Posts:

  • Change Size, Font Family and Color Of Custom Search EngineGoogle Custom Search Engine is another option that Adsense provides to increase your blog revenue. I shared detailed posts on how to create a custom search engine and integrate adsense in it. However the problem with the cust… Read More
  • Should you Enable Blogger Dynamic Views? Blogger has now officially introduced Dynamic views for all blogs by default. Now you can change the layout of your custom template into different shapes. A dynamic view is an automated code that rearranges your div areas a… Read More
  • Use Adobe PhotoShop Online!Ever wanted an online Photo Editor with complete Image Editing options just like Adobe Photoshop CS5? Fortunately I just came across a great online image editing tool by the name Pixlr . It includes all options that photoshop… Read More
  • Heading Tag With Drop Shadow and Mouse Hover Effect Blogger blogs has the free option of editing the style sheet. Fortunately you can play around the codes to give your blog any look you want. Last year I shared various ways of customizing the heading tags i.e. H3. We use H3… Read More
  • Glossy Red-Grey Tabs MenuThis new menu has two different variations. The color combination can either be red in active mode and grey on mouse hover or vice versa. It is a shiny navigation menu that is mainly created for including blogger pages such a… Read More