Are semantics and syntax the same?

John picture John · Oct 16, 2008 · Viewed 76.3k times · Source

What is the difference in meaning between 'semantics' and 'syntax'? What are they?

Also, what's the difference between things like "semantic website vs. normal website", "semantic social networking vs. normal social networking" etc.

Answer

Christian Lescuyer picture Christian Lescuyer · Oct 16, 2008

Syntax is the grammar. It describes the way to construct a correct sentence. For example, this water is triangular is syntactically correct.

Semantics relates to the meaning. this water is triangular does not mean anything, though the grammar is ok.

Talking about the semantic web has become trendy recently. The idea is to enhance the markup (structural with HTML) with additional data so computer could make sense of the web pages more easily.