Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge two HTML table cells

I'm creating a table in HTML and I'd like to have my top cell be the width of two. Here's a rough drawing:

__________________________________________ |                HEADER                  | |                                        | ========================================== |                  ||                    | |     CONTENT      ||       CONTENT      | |                  ||                    | ------------------------------------------ 

Is there any way to accomplish this in HTML?

like image 610
esqew Avatar asked Dec 03 '10 03:12

esqew


People also ask

Which tag in HTML is used to combine the cells vertically in a table?

The rowspan attributes is used to combine the cells vertically.

How do I put two columns in one row in HTML?

More columns can be added by adding more divs with the same class. The following syntax is used to add columns in HTML. <div class="row"> tag is used to initialize the row where all the columns will be added. <div class="column" > tag is used to add the corresponding number of columns.

What is Colspan in HTML?

The colspan attribute in HTML is used to set the number of columns a cell should span in a table.


1 Answers

Set the colspan attribute to 2.

...but please don't use tables for layout.

like image 90
icktoofay Avatar answered Oct 09 '22 22:10

icktoofay