How to add advanced HTML Table Colgroup to blogger post

How to add advanced responsive HTML Table Colgroup to blogger post Colors and Backgrounds example with output


Table HTML can have outer border colors as well as cell border colors. They also can have background colors, patterns, and graphic images as backdrops for the full table or for selected rows and cells.

How to add advanced responsive HTML Table Colgroup to blogger post Colors and Backgrounds example with output  Tables HTML can have outer border colors as well as cell border colors. They also can have background colors, patterns, and graphic images as backdrops for the full table or for selected rows and cells.  How to add advanced HTML Table Colgroup to blogger post     If you want to style the two first columns of a table, use the <colgroup> and <col> elements.   The <colgroup> element should be used as a container for the column specifications.  Each group are specified with an <col> element.  The span the attribute specifies how many columns that get the style.  The style attribute specifies the style to give the columns.       <!DOCTYPE html> <html> <head> <style> table, th, td {   border: 1px solid black;   border-collapse: collapse; } </style> </head> <body>  <h2>Colgroup</h2> <p>Add the a colgroup with a col element that spans over two columns to define a style for the two columns:</p>  <table style="width: 100%;"> <colgroup>   <col span="2" style="background-color: #D6EEEE"> </colgroup> <tr> <th>MON</th> <th>TUE</th> <th>WED</th> <th>THU</th> <th>FRI</th> <th>SAT</th> <th>SUN</th> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> </tr> <tr> <td>8</td> <td>9</td> <td>10</td> <td>11</td> <td>12</td> <td>13</td> <td>14</td> </tr> <tr> <td>15</td> <td>16</td> <td>17</td> <td>18</td> <td>19</td> <td>20</td> <td>21</td> </tr> <tr> <td>22</td> <td>23</td> <td>24</td> <td>25</td> <td>26</td> <td>27</td> <td>28</td> </tr> </table>  </body> </html>     Copy Video Link
How to add advanced HTML Table Colgroup to blogger post


If you want to style the two first columns of a table, use the <colgroup> and <col> elements. 

The <colgroup> element should be used as a container for the column specifications.

Each group is specified with an <col> element.

The span the attribute specifies how many columns that get the style.

The style attribute specifies the style to give the columns.




Colgroup

Add the a colgroup with a col element that spans over two columns to define a style for the two columns:

MON TUE WED THU FRI SAT SUN
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

Comments :

Post a Comment