apaCara
.com
editor
HTML
CSS
JS
PREVIEW
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Demo HTML caption</title> <style> /* contoh 2 */ caption.caption2 { text-align: right; } /* contoh 3 */ caption.caption3 { caption-side: bottom; } </style> </head> <body> <h3>Contoh 1: Caption dengan style default browser.</h3> <table border="1"> <caption>Daftar Belanja</caption> <tr> <th>Lauk-Pauk</th> <th>Sayuran</th> </tr> <tr> <td>Ikan Mas</td> <td>Wortel</td> </tr> </table> <hr /> <h3>Contoh 2: Caption dengan style rata kanan.</h3> <table border="1"> <caption class="caption2">Daftar Belanja</caption> <tr> <th>Lauk-Pauk</th> <th>Sayuran</th> </tr> <tr> <td>Ikan Mas</td> <td>Wortel</td> </tr> </table> <hr /> <h3>Contoh 3: Caption terletak dibawah tabel.</h3> <table border="1"> <caption class="caption3">Daftar Belanja</caption> <tr> <th>Lauk-Pauk</th> <th>Sayuran</th> </tr> <tr> <td>Ikan Mas</td> <td>Wortel</td> </tr> </table> </body> </html>
/* CSS code */
// javascript code