<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
margin: 10px;
}
</style>
</head>
<body>
<p>Click the button to get the position of the table caption.</p>
<button onclick="myFunction()">Try it</button>
<table>
<caption id="myCap" style="caption-side:bottom;">Table 1.1 Customers</caption>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Berglunds snabbköp</td>
<td>Christina Berglund</td>
<td>Sweden</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>
<script>
function myFunction() {
alert(document.getElementById("myCap").style.captionSide);
}
</script>