Are semantics and syntax the same?

前端 未结 9 828
旧时难觅i
旧时难觅i 2021-01-30 01:55

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 we

9条回答
  •  悲&欢浪女
    2021-01-30 02:33

    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.

提交回复
热议问题