No, headers must be before any html.
Let me explain: When a computer goes to a website, it doesn't know what's on it, so it asks your server (which is what you get when you sign up for x10) "Hey, what's on this site?" And the server replies "Here's what's on the site!" So for example, when going to Gmail, the computer asks a Gmail server "Hey, what's on this site?" and the server answers "Ok, well here's the compose button, and here's the settings" and so on and so forth. All of this is done before the page loads. PHP is a special language. It changes what the server says to the computer. So maybe, when the computer asks "Hey, what's on this site?" the server might check if a user is logged in or not. If he is logged in, it will say "This button should be green" but if he's not, the server says "This button should be Red". That's what PHP does.
But what if your computer wants to go to another page, before the server tells you what's on this one? There is only ONE WAY that the computer can tell the server what to do. In order for the computer to tell the server what to do, the computer must use a header. A header is ALWAYS placed before html, because otherwise, the server will have already started telling the computer what to do, and the computer won't have a chance to tell the server what to do. So a proper header should ALWAYS be before html. So should cookies and sessions, because they both require a header to work. In this case, you are using a header, so it should be before the <html> tag.
Hope that solves your problem.