German engineer Werner Gitt identifies 5 levels of information.
The level of statistics is concerned with the possible options for each symbol and the number of symbols contained in the text block of interest. The number of symbols for binary are 2: 0,1. For English we have 27: letters and word space (punctuation and numbers excluded). For DNA we have 4: A, T, G, C.
Shannon's theory of information does analysis at this level. This level is completely devoid of any meaning, and Shannon may give higher values to messages with zero actual meaning, such as random numbers, than to meaningful statements.
Syntax is the choice of code. A deliberate, though arbitrary, convention of what groups of symbols mean. In English "cat" has meaning, but "ith" does not. And "come" has meaning in English and Italian, but not the same meaning. DNA at the gene level has the convention of codons; groups of 3 nucleotides such as CAC which codes for valine.
Semantics are at the level of communicating ideas. The code itself does not communicate ideas. We need words but we talk in sentences. It is at this level we have meaning. Further, it is at this level meaning is invariant. We could communicate the same idea in a different language which would use a different code (syntax) and result in different storage requirements (statistics).
It is at this level (at least) that information (meaning) needs to be considered when discussing gain and loss of information.
Gitt gives a useful illustration of semantics.
A: The bird singed the song.Pragmatics is about action based on the ideas. And apobetics is about the purpose for the action.
B: The green freedom prosecuted the cerebrating house.
Sentence B is perfectly correct syntactically, but is semantically meaningless. In contrast, the semantics of sentence A is acceptable, but its syntax is erroneous.
Is important to note that much work has been done at the level of statistics. This is probably largely a result of the computer revolution; though possibly partly because this is the easiest level to define and analyse. But statistics does not discriminate meaning from non-meaning.