Stupid newbie question on Javascript, how can I..

print a variable within an html code. I have seen the tutorials at w3schools but all the examples use document.write() which content is printed out without any explicit sentence on the HTML where it should be the output.

So for example if I have something like:

var myvar= "Hello World"

then on the html

<p> This is my message to the world: $myvar .....