Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>The title of the document</title> <style> table { border-collapse: collapse; } table, th, td { border: 1px solid #cccccc; } thead { background-color: #1c87c9; color: #ffffff; } th { height: 50px; text-align: center; } td { padding: 3px 10px; } </style> </head> <body> <h2>Border-collapse property example</h2> <p>Here the "collapse" value is set for the border-collapse property.</p> <table> <thead> <tr> <th>Heading</th> <th>Heading</th> <th>Heading</th> <th>Heading</th> </tr> </thead> <tbody> <tr> <td>Some text</td> <td>Some text</td> <td>Some text</td> <td>Some text</td> </tr> <tr> <td>Some text</td> <td>Some text</td> <td>Some text</td> <td>Some text</td> </tr> </tbody> </table> </body> </html>