3 ms·
Omitting html, head, and body tags is allowed by HTML specs, and the script tag's default type is "text/javascript". So it could be further simplified to: <t
by lioeters 7y ago
Omitting html, head, and body tags is allowed by HTML specs, and the script tag's default type is "text/javascript". So it could be further simplified to:
<title>Test</title>
<div id="howdy"></div>
<script>
document.addEventListener('DOMContentLoaded',
() => document.getElementById('howdy').innerHTML = 'Hello world!'
)
</script>
Edit: formatting