Home >> HTML 5 >> What is Table Colgroup in HTML 5

What is Table Colgroup in HTML 5

HTML Table Colgroup element is used to style specific columns of a table.
 
Example
<!Doctype Html>  
<html>     
<head>      
<title>HTML table Colgroup</title>
<style>
     table, th, td {
     border: 1px solid #FFF;
     }
</style>
</head>  
<body>   
<table width="200" height="200" border="1">
    <colgroup>
    <col span="2" style="background-color: #000">
    </colgroup>
    <tr>
        <td>A</th>
        <td>B</th>
        <td>C</th>
    </tr>
    <tr>
        <td>C</td>
        <td>D</td>
        <td>E</td>
    </tr>
</table>
</body>  
</html>  

Post Your Comment

Next Questions
How many type of Lists
What is Unordered Lists
What is Ordered Lists
What is Block and Inline Elements
What is HTML class Attribute
What is HTML id Attribute
What is HTML Iframes
What is HTML JavaScript
What is HTML File Paths
What is HTML Head Element
What is HTML Layout
What is HTML Responsive Website Design
What is HTML Forms
What is HTML Form Attributes
What is HTML Form Elements
What is HTML Input Types
What is HTML Input Attributes
What is HTML Input form attributes
What is HTML SVG Graphics
What is HTML Multimedia
What is HTML Video
What is HTML Audio
How to Embed YouTube Video
What is HTML Predefined Tags
What is HTML Predefined Attributes

Copyright ©2022 coderraj.com. All Rights Reserved.