Use the rowspan property to set the number of rows a table cell should span. To merge cells in HTML, use the colspan and rowspan attributes. The rowspan property specifies the number of rows the cell should span, while the colspan property specifies the number of columns the cell should span.
<!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; width: 100px; height: 50px; } </style> </head> <body> <h1>Heading</h1> <table> <tr> <th colspan = "2"></th> <th></th> </tr> <tr> <td></td> <td></td> <td rowspan = "2"></td> </tr> <tr> <td></td> <td></td> </tr> </table> </body> </html>
The above is the detailed content of How to set the number of rows a table cell should span in HTML?. For more information, please follow other related articles on the PHP Chinese website!