Basically, it's not HTML. You have to put the HTML code or it won't work.
The browser execute the instructions in HTML. If the HTML invoke a javascript procedure, then it's executed.
Besides that, you opened a lot of { and they're not matched by the same number of }.
Start with the basics and...