The set of rules that govern how words are put together to form sentences in a language
Examples:
The teacher explained the basic rules of grammar to the class.Grammar is the set of rules that govern how words are used.She studied grammar extensively to improve her writing skills.
Synonyms:
Antonyms:
Syntax
The arrangement of words and phrases to create well-formed sentences in a language.
Examples:
The syntax of the programming language was elegant.Syntax rules differ between spoken and written forms.He struggled to grasp the syntax of ancient texts.
Synonyms:
Antonyms:
Ways to tell them apart:
Syntax refers to the arrangement of words in a sentence.
Grammar encompasses syntax, but also includes rules about how words change form to convey different meanings.
Syntax is about structure; grammar includes both structure and meaning.
If youre talking about sentence mechanics, youre often referring to syntax.
Grammar rules tell you the proper way to use language, including word forms like run vs ran.