there is a blank line required separating the HTTP header and html code.
I don't remember exactly what web, but search for HTTP explained has more info.....tons of info....too much info !!
good luck