<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<p>Click the button to get the value of the abbr attribute of th with id "myTh".</p>
<table>
<tr>
<th id="myTh" abbr="Make">Toy manufacturer</th>
<th abbr="Model">Vehicle model</th>
</tr>
<tr>
<td>Bruder Toys</td>
<td>Cross Country Vehicle</td>
</tr>
</table>
<br>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myTh").abbr;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>