When referring to a programming language or command, syntax is a set of rules that are associated with the language or command.
When referring to an error, a syntax error is an error that is encountered when the programmer or individual who wrote the code has not followed the rules of the language, causing the program to fail.