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?
The rowspan attributes is used to combine the cells vertically.
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.
The colspan attribute in HTML is used to set the number of columns a cell should span in a table.
Set the colspan
attribute to 2.
...but please don't use tables for layout.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With