How to use colspan and rowspan in HTML Tables?

Easy HTML tables tutorial

Learn Share & Grow

In a recent HTML relevant discussion with some of my colleagues, someone asked me a question how to use colspan and rowspan together. Frankly I never used it together but I know how to use them so I told them but then again it came to me how many others out there that might have faced the same question or have been asking even now. Let’s write about it and share with those how to do it.

I am going to show you how to create a student marks sheet which looks something like following in Microsoft Excel.


Let’s create this sheet. First of all we will create the rows and columns which don’t have any spanned row or column. Following is the code to create the lower rows of the table.

<table bgcolor=”#663366”>
<tr bgcolor=”#FFFF80″>
<td width=”100px”>Student -1 </td>
<td width=”50px”>  </td>
<td width=”50px”>  </td>
<td width=”50px”>  </td>

View original post 210 more words


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s