Purple: Style
Blue: HTML
Green: JavaScript
<!DOCTYPE html>
<html>
<style>
#dates {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#dates td, #dates th {
border: 1px solid #ddd;
padding: 8px;
}
#dates tr:nth-child(even){background-color: #f2f2f2;}
#dates tr:hover {background-color: #ddd;}
#dates th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>
<body>
<h2>Date Method</h2>
<table id="dates">
<tr>
<td>
<p id="p1"></p>
</td>
<td>
<p id="p2"></p>
</td>
</tr>
<tr>
<td>
<p id="p3"></p>
</td>
<td>
<p id="p4"></p>
</td>
</tr>
</table>
<script>
document.getElementById("p1").innerHTML = "Create new date and object"
var d = new Date();
document.getElementById("p2").innerHTML = d;
</script>
</body>
</html>