Semantics (Greek: semantikos, significant meaning, from sema, sign) is the study of meaning, in some sense of that term, as such is encoded into and deciphered from any variety of representative forms, usually in language. Semantics is commonly contrasted with syntax, which pertains to the formal arrangement of characters and words in the expressions of a given language.
Semantics is distinguished from ontology (study of existence) in being about the use of a word more than the nature of the entity referenced by the word. This is reflected in the argument, "That's only semantics," when someone tries to draw conclusions about what is true about the world based on what is true about a word. Semantic memory is a term used in neuropsychology to refer to memory for facts, or "knowledge", as opposed to memory for events (episodic memory).
Semantics is a subfield of linguistics that is traditionally defined as the study of meaning of (parts of) words, phrases, sentences, and texts. Semantics can be approached from a theoretical as well as an empirical (for example psycholinguistic and neuroscientific) point of view. The decompositional perspective towards meaning holds that the meaning of words can be analyzed by defining meaning atoms or primitives, which establish a language of thought. An area of study is the meaning of compounds, another is the study of relations between different linguistic expressions (homonymy, synonymy, antonymy, polysemy, paronyms, hypernymy, hyponymy, meronymy, metonymy, holonymy, exocentric, and endocentric). Semantics includes the study of thematic roles, argument structure, and its linking to syntax. Semantics deals with sense and reference, truth conditions, and discourse analysis. Pragmatics is often considered a part of semantics, but otherwise is treated as a branch of its own.
Many of the formal approaches to semantics applied in linguistics, mathematical logic, and computer science originated in techniques for the semantics of logic, most influentially being Alfred Tarski's ideas in model theory and his semantic theory of truth. Also, inferential role semantics has its roots in the work of Gerhard Gentzen on proof theory and proof-theoretic semantics. One of the most popular alternatives to the standard model theoretic semantics is truth-value semantics.