What is syntax and what does it mean for somebody learning a new programming language?
Syntax really is just the basic rules of how the language is structured. Does it use special characters to end each line or each expression? Does it use indentation levels and empty spaces to mean something special? Does it reserve special words for its own use? These are called keywords and most programming languages have them.
Programming languages need these special and very specific rules in order to avoid any misunderstanding about what we want the computer to do.
Languages also provide extra capability in the form of standard libraries and frameworks. Because these libraries are so useful and common, it’s easy to confuse them with the syntax of the language itself.