A tag (Aramaic: תאג, plural tagin, תאגין) is a decoration drawn over some Hebrew letters in the Jewish scrolls of Sifrei Kodesh, Tefillin and Mezuzot.
In modern practice, the letters Beth, Daleth, He, Heth, Yud and Quf (mnemonic: BeDeQ-ChaYaH בדק חיה) have one tag.
The letters Gimel, Zayin, Tet, Nun, Ayin, Tzadi and Shin (mnemonic: Sha´ATNeZ-GaTz שעטנז גץ), as far back as Talmudic times, have 3 tags.
[3] This tradition, predating the versification of the Torah text, contains some instruction wherein it is difficult to know what verses are being referenced, thus in the 12th century, Maimonides ruled that though a scribe should do his utmost to incorporate all of the elements of this tradition, called otiyyot meshunot (strange letters), if they are omitted, whether in full or in part, the scroll would not be ruled as pasul (invalid).
[4] In a notable sugya, in which Moses sees Rabbi Akiva (Menachot 29b), a story in the Babylonian Talmud states that tagin were originally added to the text by God at Mount Sinai, and that Rabbi Akiva would use their presence in order to derive numerous laws by midrash (rabbinic exegesis).