syntax

IPA/ˈsɪntæks/
KK[sˈɪntˌæks]IPA/ˈsɪntæks/

syntax — noun

1. the set of rules in a language that control how words are arranged to form corre

1.nounB2
Definition

the set of rules in a language that control how words are arranged to form correct phrases, clauses, and sentences

Example

The syntax of Japanese sentences differs greatly from that of English.

comparative syntax across languages

Sari's English teacher helped her understand basic syntax through simple sentence diagrams.

Common collocations
  • basic syntax
  • English syntax
  • complex syntax
  • correct syntax
  • syntax rules
Synonyms
  • grammar

    broader term that includes syntax, morphology, and punctuation rules

  • word order

    one aspect of syntax, specifically the sequence of words in a sentence

  • sentence structure

    more general term that overlaps with syntax but can also refer to length and complexity

Usage Note

Syntax is usually studied as an uncountable noun. In language education, it focuses on word order and sentence patterns — distinct from morphology, which deals with word forms like prefixes and suffixes.

Common Mistakes

The syntax of this sentence are confusing.
The syntax of this sentence is confusing.
syntax is an uncountable noun and takes a singular verb.
Syntaxes vary across languages.
Syntax varies across languages.
do not pluralise syntax when referring to grammatical rules in general.

2. the rules that determine how commands, symbols, and punctuation must be written

2.nounB2
Definition

the rules that determine how commands, symbols, and punctuation must be written in a programming language so that a computer can understand them

Example

Hao fixed the bug by checking the syntax of his Python code line by line.

A single missing semicolon can break the syntax of an entire JavaScript program.

syntax error: missing punctuation

Common collocations
  • syntax error
  • programming syntax
  • Python syntax
  • syntax highlighting
  • syntax checker
Synonyms
  • coding rules

    informal term for the format requirements of a programming language

  • language structure

    focuses on the overall organisation of commands and expressions

  • format rules

    emphasises punctuation and indentation requirements

Usage Note

In computing, syntax can be countable (e.g. 'this language has two different syntaxes for loops') or uncountable. A syntax error means the code does not follow the language's required format and cannot be compiled or run.

Common Mistakes

I need to fix the grammar of my code.
I need to fix the syntax of my code.
in programming, syntax refers to code structure; grammar describes natural language.

3. an organised structure in which the parts of something — such as music, art, or

3.nounC1
Definition

an organised structure in which the parts of something — such as music, art, or a system — are arranged in a clear, logical order

Example

The syntax of a musical composition can be as important as its melody.

syntax + music composition

Art historians studied the syntax of the cathedral's architectural elements.

Common collocations
  • musical syntax
  • visual syntax
  • architectural syntax
  • syntax of a system
Synonyms
  • structure

    simpler, more general term for how parts fit together

  • arrangement

    emphasises the order of elements rather than the rules behind the order

  • organisation

    focuses on how components are grouped or categorised

  • logic

    suggests an internal reasoning or principle behind the arrangement

Antonyms
  • chaos

    complete lack of structure or order

Usage Note

This sense is used in formal, academic, or abstract contexts outside of language and computing. It often appears in discussions of music theory, art criticism, logic, or systems theory.

Common Mistakes

The syntax of the painting was colourful.
The syntax of the painting followed a clear structure.
syntax refers to arrangement, not sensory qualities like colour.

Word family

Synonym discussion

Sense: noun/1

Syntax refers specifically to the rules for arranging words into phrases and sentences — the 'skeleton' of a language. Grammar is the broader term that includes syntax, morphology (word formation), and punctuation. Word order is a narrower aspect of syntax dealing strictly with the sequence of words (e.g. subject-verb-object vs subject-object-verb). Morphology is the sister discipline: it studies internal word structure (prefixes, suffixes, tense markers) rather than how whole words combine into sentences. Sentence structure is a general, non-technical term that overlaps with syntax but can also include considerations of length and complexity. Example: 'In English, the syntax requires that adjectives come before nouns' (syntax), vs 'The grammar of English requires that plural nouns take an -s ending' (morphology, part of grammar).

Common collocations

Nouns

  • syntax rules
  • syntax analysis
  • syntax checker
  • syntax highlighting
  • syntax error

Prepositions

  • syntax of

Etymology

GreekLatinFrenchEnglish

Syntax comes from the Greek word 'syntaxis', where 'syn-' means 'together' and 'tassein' means 'to arrange'. It entered English through Latin ('syntaxis') and French ('syntaxe'), first appearing in the 16th century as a term for grammatical arrangement. The computing sense emerged in the mid-20th century with the development of programming languages.