Simple Examples in Javascript

document.write is a simple function used to display the content to the browser and it also embeds HTML tags inside it and renders as HTML tags.

<script type=text/javascript>
document.write("Hello How are you");
document.write("<h1> This is header 1 </h1>");
document.write("<p> This is a new paragraph </p>");

1 thought on “Simple Examples in Javascript”

Leave a Reply