Positioning the Caption

The caption-side property has two values: top (the default) and bottom.

 
<!DOCTYPE HTML> 
<html> 
    <head> 
        <title>Example</title> 
        <style> 
            table { 
                border-collapse: collapse; 
                caption-side: bottom; 
            } 
            th, td { 
                padding: 5px; 
            } 
        </style> 
    </head> 
    <body> 
        <table border="1"> 
            <caption>A caption</caption> 
            <tr> 
                <td>A</td> 
                <td>B</td> 
                <td>C</td> 
            </tr> 
            <tr> 
                <td>D</td> 
                <td>E</td> 
                <td>F</td> 
            </tr> 
        </table>         
    </body> 
</html>
  
Click to view the demo
Home 
  HTML CSS Book 
    CSS  

Table Style:
  1. Styling Tables
  2. Configuring Separated Borders
  3. Dealing with Empty Cells
  4. Positioning the Caption
  5. Specifying the Table Layout
Related: