Each statement/request passed to the browser, is seperated using semi-colon ( ; ), or by moving to the next line of the script (Its a way to denote one statement, from another). So when you write:a='<div>
Lets say a variable is created, called 'a' and at the time the browser wants to create the string, that will be assigned to it, it finds out that you are missing the closing apostrophe, then it generate error.