Syntax is the spelling and grammar of a programming language. Programming languages have rules for spelling, punctuation and grammar, just like the English language. In programming, a syntax error occurs when:
Syntax errors will cause a program to crash or not run at all. The program may run until it encounters a syntax error, then it will stop.
More than one type of syntax error may exist. There may be:
Any one or more of these errors may exist in a program, and each will cause the program to crash or not run at all.