Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> caption { background: #1c87c9; color: #fff; } .top caption { caption-side: top; } table, th, td { border: 1px solid #1c87c9; padding: 3px; } td { background-color: #ccc; color: #666; } </style> </head> <body> <h2>Caption-side property example</h2> <p>Here the caption-side is set to "top":</p> <table class="top"> <caption>Some title here</caption> <tr> <td>Some text</td> <td>Some text</td> </tr> </table> </body> </html>