syntax is the way words and phrases are put together to form sentences in a language, or the rules of grammar governing that arrangement; in computing, it is the rules for how words and symbols must be used in a computer language.
The Oxford Advanced Learner's Dictionary labels the first sense linguistics and defines it as "the way that words and phrases are put together to form sentences in a language; the rules of grammar for this," with a cross-reference to compare morphology. Cambridge Dictionary marks the word as specialized and defines it as "the grammatical arrangement of words in a sentence." Dictionary.com, under its linguistics label, lists the study of the rules and patterns by which sentences and phrases are formed, those rules or patterns themselves, a presentation of them, and an instance of them.
In computing, Oxford defines syntax as "the rules that state how words and phrases must be used in a computer language," illustrated with a syntax error, and the Cambridge Business English Dictionary gives "the rules that state how, and in which order, words and symbols must be used in a particular computer language." Dictionary.com also records a logic sense, the study of the signs in a system and their possible arrangements without reference to their meaning, and a general sense of any orderly arrangement.
Oxford dates the word to the late 16th century, from French syntaxe, or via late Latin from Greek suntaxis, from sun- "together" and tassein "arrange."
syntax the way in which linguistic elements (such as words) are put together to form constituents (such as phrases or clauses)
