How to display current date in html using javascript?

JavaScript

1 answer

Answer

1122641

2026-08-01 14:50

+ Follow

JavaScript
JavaScript

You can't do it in HTML, but you can in JavaScript or PHP, which can be added to an HTML document. Just add the code to where you want it to display the time.

<?PHP print(Date("l F d, Y")); ?>

<script type="text/JavaScript">

<!--

document.write(Date());

-->

</script>

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.