<html>
<body>
<p id="currentDate"></p>
</body>
<script>
// Get the current date and time
var now = new Date();
// Format the date (e.g., toLocaleDateString() for localized format)
var dateString = now.toLocaleDateString();
// Get the HTML element by its ID
var dateElement = document.getElementById("currentDate");
// Insert the date string into the HTML element
dateElement.innerHTML = dateString;
</script>
</html>