HTML Table Column
From w3cyberlearnings
Contents |
HTML Table Column
Use <colgroup> tag to define the table column.
Example 1 TRY-IT
<table border="1"> <colgroup span="2" style="background-color:blue"></colgroup> <colgroup style="background-color:green"></colgroup> <tr><th>Subject</th><th>Score</th><th>Average</th></tr> <tr><th>English</th><td>98</td><td>82</td></tr> <tr><th>Maths</th><td>84</td><td>78</td></tr> <tr><th>Physics</th><td>95</td><td>88</td></tr> <tr><th>History</th><td>86</td><td>78</td></tr> <tr><th>Science</th><td>88</td><td>93</td></tr> </table>
Example 2 TRY-IT
<table border="1"> <colgroup style="background-color:green"></colgroup> <colgroup span="2" style="background-color:blue"></colgroup> <tr><th>Subject</th><th>Score</th><th>Average</th></tr> <tr><th>English</th><td>98</td><td>82</td></tr> <tr><th>Maths</th><td>84</td><td>78</td></tr> <tr><th>Physics</th><td>95</td><td>88</td></tr> <tr><th>History</th><td>86</td><td>78</td></tr> <tr><th>Science</th><td>88</td><td>93</td></tr> </table>
Related Link
Table
- HTML - Table
- HTML - Table Border
- HTML - Table Column
- HTML - Table Row
- HTML - Table Color
- HTML - Table Cell Spacing and Padding
- HTML - Text Align
- HTML - Text Vertical Align
- HTML - Table Caption and Summary
- HTML - Table thead, tbody, tfoot
- HTML - Inner Table
- HTML - Table Vertical Line
- HTML - Table Horizontal Line