Put simply, syntax refers to grammar, while semantics refers to meaning. Syntax is the set of rules needed to ensure a sentence is grammatically correct; semantics is how one's lexicon, grammatical structure, tone, and other elements of a sentence coalesce to communicate its meaning.
Is grammar a syntax?
Many think that syntax and grammar are one and the same thing, but the fact is syntax is just a part of grammar. As against, grammar is the entire system of rules that allows people to form and interpret words, clauses, phrases and sentences, in their language.
Is grammar a part of semantics?
The linguist attempts to construct a grammar, an explicit description of the language, the categories of the language and the rules by which they interact. Semantics is one part of grammar; phonology, syntax and morphology are other parts," (Charles W. Kreidler, Introducing English Semantics.