• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Live Laugh Rowe
  • About
    • About Me
    • Contact Me
    • The Rowes
    • In The Press
    • PR & Advertise
    • Privacy Policy
    • Resources
  • Recipes
    • Appetizers/Snacks
    • Beverages
    • Breakfast
    • Desserts
    • Main Dish
    • Side Dishes
    • Sandwiches
    • Skinny Dishes
    • Slow Cooker
    • Soups/Chilis
    • Weight Watchers
  • Crafts & DIY
    • Crafts
    • Decor
    • DIY Projects
    • Fall Projects
    • Holidays
    • Home Projects
  • Printables
  • Shop My Home
  • Facebook
  • Instagram
  • Pinterest
  • Twitter
Subscribe
Live Laugh Rowe

Live Laugh Rowe

A lifestyle blog that shares crafts, recipes, tutorials and life's moments.

  • About
    • About Me
    • Contact Me
    • The Rowes
    • In The Press
    • PR & Advertise
    • Privacy Policy
    • Resources
  • Recipes
    • Appetizers/Snacks
    • Beverages
    • Breakfast
    • Desserts
    • Main Dish
    • Side Dishes
    • Sandwiches
    • Skinny Dishes
    • Slow Cooker
    • Soups/Chilis
    • Weight Watchers
  • Crafts & DIY
    • Crafts
    • Decor
    • DIY Projects
    • Fall Projects
    • Holidays
    • Home Projects
  • Printables
  • Shop My Home
  • Facebook
  • Instagram
  • Pinterest
  • Twitter
Subscribe

{DIY} HTML Tables // Part II

02/17/2012 · Kelly Rowe · 12 Comments

This post may contain Amazon or other affiliate links. As an Amazon Associate I earn from qualifying purchases.

Pin
Share
Post
Share

Oh Happy Day! More HTML Table fun!  My hubby is assisting us once again with HTML Tables Part II.  Are we lucky girls or what? He’s a great teacher with this technical jibber jabber and seems to make it a little more understandable than some tutorials, you know, the ones that just simply make you go cross-eyed {giggle}.  So, let’s now learn how to add some spice to our tables.

Those of you who have worked in Microsoft Excel may be familiar with the “Merge Cells” feature. For those not familiar with the feature, it allows you to take two (or more) cells and merge them in to one cell. The width of the merged cell is the same as the combined width of the two (or more) individual cells. HTML tables provide a similar function with the colspan option.

The Basics of “Merging” Cells

In the original post, {DIY} HTML Tables, we built a basic two row and two column table to align images of the same size. But now you’re bored with four square format and want to add some variety to the table. What if you want to use an image that stretches across the width of two column? Well, we can do this using the colspan option.

The code below shows the original structure of a two row and two column table.

<table border = "0">
  <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>

We modify this code with the addition of the colspan option placing it within the <td> tag. We use colspan="2" because we want the row to span “2” columns. Now, since each <td> tag defines a column, and we told the first <td> to span both columns, we do not need the second <td> tag. I drew a line through it for a totally awesome effect, but you will have to remove that line of code completely.

<table border = "0">
  <tbody>
    <tr>
      <td>Row 1 Column 1</td>
      <td>Row 1 Column 2</td>
    </tr>
    <tr>
      <td colspan="2">Row 2 Column 1 and 2 Merged</td>
      <td>Row 2 Column 2</td>
    </tr>
  </tbody>
</table>

Once you remove it, your finished code should resemble the code below.

<table border = "0">
  <tbody>
    <tr>
      <td>Row 1 Column 1</td>
      <td>Row 1 Column 2</td>
    </tr>
    <tr>
      <td colspan="2">Row 2 Column 1 and 2 Merged</td>
    </tr>
  </tbody>
</table>

Here is what the table code above will look like parsed by the web browser.

Row 1 Column 1 Row 1 Column 2
Row 2 Column 1 and 2 Merged

How To Use It

Table 1 shows the basic two row and two column table. We use the table to place two 125 x 125 pictures in each cell of the first row leaving row 2 columns 1 and 2 for additional pictures.

Table 1

Photobucket Photobucket
Row 2 Column 1 Row 2 Column 2

Next, we decide to add a 250 x 125 picture in row 2. If we simple add it to one of the cells, that cell not only stretches to accomodate this larger picture, but also stretches the corresponding column in row 1. The unpleasant result is shown in Table 2.

Table 2

Photobucket Photobucket
Row 2 Column 2

By spanning the row across two columns, we create a single cell that has the width of two columns as shown in Table 3.

Table 3

Photobucket Photobucket

Maybe you want three 125 x 125 pictures in row 1, and two pictures in row 2 with one being 250 x 125 and the other 125 x 125? That can be easily done by applying the same colspan principles. But rather than give you the code, I will let you try to figure it out. Hint: you can view the source code of this webpage.

Table 4

Photobucket Photobucket Photobucket
Photobucket
Well, what do you think?  Doable?  Good luck!  If you found these tutorials helpful, be a dear and pin it and/or stumble it?  Spread a little {love}. Thanks so much.  Make it a fabulous day, friends!
Subscribe to Updates | Like on Facebook | Follow on Pinterest
Pin It
keep living and laughing, friends.
Pin
Share
Post
Share

Related Posts

{DIY} HTML Tables

Making a Bloggy Grab Button {Tutorial}

Oops! I did it again...

Farmhouse Inspired Master Bedroom Makeover. Perfectly light, bright and so many beautiful pieces. See all the details at livelaughrowe.com

Farmhouse Inspired Master Bedroom Makeover (Before we moved!)

Wall Paneling Pictures

DIY Wall Paneling Ideas

25+ DIY Pineapple Projects and Printables for you to enjoy!

25+ Pineapple Projects and Printables

DIY Projects, Technical Jibber Jabber

Previous Post: « Valentine’s Day Giveaway {Today ONLY}
Next Post: Grow Your Blog // Blog Hop »
about kelly

ABOUT KELLY

A DIY fanatic, Kelly shares her journey through her blog, Live Laugh Rowe, where she showcases her recipes, tutorials, crafts, home projects, and all things DIY. This East Coast Girl at heart believes family is number one as she finds the perfect balance of being a daughter, wife, sister, entrepreneur, writer and woman of God. Be sure to follow along as she shares her passion for life, love and family! Read more...

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recipe Rating




Comments

  1. Maria @ Craft Crazy Mom says

    02/19/2012 at 3:23 pm

    I just pinned this! I did most of the html on my blog and I have yet to make a table. Thanks SO SO SO much for sharing! Newest follower via the blog hop šŸ™‚

    Reply
  2. Monica says

    02/20/2012 at 1:10 pm

    Hi,
    I am a new GFC follower. I found you on a blog hop. I would love for you to stop by my site and follow me as well. Also check out our giveaway for a $170 Technogel Pillow if you are interested. Thanks
    http://www.chunkyandmonkeymd.com

    Reply
  3. Sherry says

    02/20/2012 at 1:22 pm

    Thanks so much for hosting this blog hop party!

    Reply
  4. Tiffany @ No Ordinary Homestead says

    02/21/2012 at 7:41 am

    Very useful post. Tables can really make things look and flow so much better. Although I don't use it for many things, tables to throw stuff up on my blog is a very good reason to keep Dreamweaver installed on my computer. Then I don't have to remember to open and close all the bits & pieces of the table. There's some great free HTML editors out there as well, like nvu, which can help with the more complicated tables.

    Just found your blog via 36th Ave & the blog hop šŸ™‚

    Reply
  5. Kyra says

    02/21/2012 at 1:05 pm

    Thanks for trying to help the technically challenged like me!! This is great! However, can I trade you dinner for technical support šŸ™‚ Ha – I'll try to figure this out- I love it.

    New follower via tip junkie!
    kyra @caramelpotatoes.com

    Reply
  6. How to Nest for Less says

    02/23/2012 at 8:26 pm

    Holy smackers girl! I need to take some HTML classes šŸ™‚

    Reply
  7. Alisha Goinggfree says

    02/24/2012 at 10:46 am

    Thank You so much for this tut!! You are awesome!!!

    Alisha

    Reply
  8. Marriage from Scratch says

    02/24/2012 at 9:29 pm

    Very informative! thanks!

    I’d love if you would come link this up at From Scratch Friday!

    ~Christina
    http://www.marriagefromscratch.blogspot.com

    Reply
  9. AmieAnn says

    02/26/2012 at 6:53 am

    You and your hubby are html rock stars! Thanks so much for sharing with the Pink Hippo Party.. can't wait to see what you share next!

    Reply
  10. cathy@my1929charmer says

    02/28/2012 at 7:12 pm

    You guys sure know your stuff, except I don't think I do. Very informative, but it's like chemistry, just kinds of freaks me out. I so do appreciate you trying to "enlighted". Thanks for sharing your creative inspiration at Sunday's Best Par.tay!

    Reply
  11. Emily @ 52 Mantels says

    02/29/2012 at 11:13 am

    Awesomeness!! I've been meaning to try this out, but haven't gotten around to it yet. Why oh why is my to-do list so long?? But, I will be doing this asap! šŸ™‚

    Thanks so much for linking up last Thursday!! You rock!

    Reply
  12. Polkadot-pretties says

    03/03/2012 at 9:17 am

    Fabulous project!!!
    Thank you for linking up, hope you will stop by my blog today and link up another great project…
    Claire xox
    http://polkadot-pretties.blogspot.com/

    Reply

Primary Sidebar

Looking for something?

Hey there! I’m Kelly.

I’m the author, creator, cook, and photographer behind the blog. I am so glad you’re here!Ā  I’m passionate about life, family, and my faith. If there’s one thing I’ve learned in my journey, life is hard, but God is good. Ā Read More

Top Pin on Pinterest:

Festive Winter Printable

Footer

  • Facebook
  • Instagram
  • Pinterest
  • Twitter
  • YouTube

Looking for something?

Copyright Ā© Live Laugh Rowe, LLC • Privacy Policy • Log in