Syntax comes from the Greek and means the teaching of sentence structure. It is therefore the regulation of language and the unambiguous mode of communication described by the sequence of signs.
The syntax is the grammar, the text structure and the order of the words of a sentence. Syntactic rules include punctuation, capitalization, spelling at the beginning of the sentence and the sign at the end of the sentence, etc. Applied to programming languages, syntax includes the commands, characters, and the character sequences for program formulations.
The syntax applies equally to natural languages and programming languages. Some programming languages are extremely inflexible in syntactic interpretation, while in others the order of commands is flexible.