Manellen
Manellen

Reputation: 329

How to create unique html table?

I have problem to create table like image below: enter image description here Does anyone know how to create table above using html and css? I Use that table to create content like this below: enter image description here Please guide me and thanks in advance.

Upvotes: 1

Views: 1387

Answers (2)

2.718
2.718

Reputation: 435

rowspan=2 will let you merge cells vertically.

E.g. here is the start of your table:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"><HTML>
<BODY>
<table border>
  <tr>
    <td rowspan=2>row 1, column 1</td>
    <td>row 1, column 2</td>
    <td>row 1, column 3</td>
  </tr>
  <tr>
    <!--td row 2, column 1, covered by row above-->
    <td rowspan=2>row 2, column 2</td>
    <td>row 2, column 3</td>
  </tr>
  <tr>
    <td>row 3, column 1</td>
    <!--td row 3, column 2, covered by row above-->
    <td>row 3, column 3</td>
  </tr>
</table>
</BODY>
</HTML>

To generate tables like that manually gets messy pretty quickly. You'd be better off with a good layout tool.

Upvotes: 3

Thakkennes
Thakkennes

Reputation: 215

Make a table of 6 rows by 3 columns and make some of the borders invisible, this would be the easiest. I think you can figure the rest of it out by yourself.

Upvotes: 1

Related Questions