html print year code example Example: html print year <script>document.write(new Date().getFullYear())</script>