Here's why:
* Syntax refers to the rules of how code is written and structured. This includes things like using the correct punctuation, keywords, and structure for a specific programming language.
* Errors are deviations from these rules that prevent the code from being understood and executed correctly.
So, when you have a punctuation or spelling mistake in your code, the interpreter or compiler can't understand what you're trying to do and throws a syntax error message.