In my opinion you should not hide everything, since the user will not know that anything is happening until everything is loaded. Some things will have to be shown quickly, preferably navigation and perhaps something telling the user that the page is loading.
The simplest way of hiding all content that should be hidden until everything is loaded, is by keeping such content in one or more divs that initially have class="notloaded", and use body.onload to document.getElementsByClassName to get these elements and for each of them set className='';
If you want to more selectively hide things you can use descendant or direct child selectors
/* applies to the element with id="content" class="content" */
#content.notloaded
/* applies to any descendant (child, grandchild etc) of the contentdiv,
but not the div itself */
#content.notloaded *
/* applies to any p or img element that is a direct child of the content div */
#content.notloaded > p,
/* same as above but for body element with class="notloaded" */
body.notloaded span, body.notloaded img
This way you can affect all those hidden elements by removing the classname from one single ancestor element.