In logic, syntax is an arrangement of well-structured entities in the formal languages or formal systems that express something. Syntax is concerned with the rules used for constructing or transforming the symbols and words of a language, as contrasted with the semantics of a language, which is concerned with its meaning.
The symbols, formulas, systems, theorems and proofs expressed in formal languages are syntactic entities whose properties may be studied without regard to any meaning they may be given, and, in fact, need not be given any.