 <p>The <code>&lt;</code> and <code>&gt;</code> in code that is mixed with HTML usually cause trouble because these are special characters for html. It is always best to move your script to a separate file and link to it from the html.</p>