<html>
<body>
<h2>How to Create a thead Element</h2>
<p>Click "Try it" to create a TIME element that specifies the date of "Valentines day (2014-02-14)".</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
var x = document.createElement("TIME");
x.setAttribute("datetime", "2014-02-14");
var t = document.createTextNode("Valentines day");
x.appendChild(t);
document.body.appendChild(x);
}
</script>
</body>
</html>