<script type="text/javascript">
document.write("<style> body{padding: 2rem;} img{width: 20rem; margin-bottom: 1rem;} </style>"); //This adds internal css to the page using document.write.
document.write("<img src='https://images.pexels.com/photos/4484954/pexels-photo-4484954.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260' alt='Photo of a sloth in a tree.'>"); //This uses document.write to place an image on the page (with a url as the source)
document.write("<br>");
document.write("<img src='damselfly.jpg' alt='Photo of a damselfly on a blade of grass.'>"); //This uses document.write to place an image on the page (stored on the server that hosts the website)
document.write("<h1>This is an h1 tag writen to the page using document.write. </h1>");
document.write("<p>This is a paragraph element placed on the page using document.write. </p>");
</script>