Syntax is the way in which words and punctuation are used and arranged to form phrases, clauses and sentences. This can mean the selection of a word or the word's tense, the arrangement of the words and the selection of the punctuation.
Syntax is also known as the study of the rules that must be followed to create well-formed phrases, clauses and sentences.