In: Computer Science
Tables: Write the HTML code for a table data cell that contain the text “Holiday” and spans across 3 rows and 4 columns.
Dear Student ,
As per requirement submitted above kindly find below solution.
HTML code snippet :
<!DOCTYPE html>
<html lang="en">
<head>
<!-- title for web page -->
<title>Table Data Cell</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!-- html table -->
<table border="1">
<tr>
<td rowspan="3" colspan="4">Holiday</td>
</tr>
</table>
</body>
</html>
************************************************
Output :
**********************************************************
Demonstration :Below code is used to test whether table data cells span across three rows and four columns.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- title for web page -->
<title>Table Data Cell</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<!-- html table -->
<table border="1">
<tr>
<td rowspan="3" colspan="4">Holiday</td>
<td>Row 1 Column 5</td>
</tr>
<tr>
<td>Row 2 Column 5</td>
</tr>
<tr>
<td>Row 3 Column 5</td>
</tr>
<tr>
<td>Row 4 Column 1</td>
<td>Row 4 Column 2</td>
<td>Row 4 Column 3</td>
<td>Row 4 Column 4</td>
<td>Row 4 Column 5</td>
</tr>
</table>
</body>
</html>
==================================
Output :
NOTE :PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.