效果: ...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>colgroup</title> <style> .engine{ background-color: aquamarine; } </style> </head> <body> <table border="1"> <!--列組 --> <colgroup> <col class="browser"> <col class="engine" span="2"> </colgroup> <thead> <tr> <th>瀏覽器</th> <th>渲染引擎</th> <th>JavaScript 引擎</th> </tr> </thead> <tbody> <tr> <th>Chrome</th> <td>Blink</td> <td>V8</td> </tr> <tr> <th>Opera</th> <td>Blink</td> <td>V8</td> </tr> <tr> <th>Edge</th> <td>EdgeHTML</td> <td>Chakra</td> </tr> </tbody> </table> </body> </html>
效果: