The ruling on placing an inscription on the grave stating the name of the deceased, the date of his death etc.
“It is not permissible to write on the grave [i.e. headstone] of the deceased, neither Qur’anic Āyāt, nor anything else, whether in metal, on a sign or on anything else. This is because of what has been authentically reported from the Prophet صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ via the Hadeeth of Jābir رَضِيَ اللهُ عَنْهُ, he [صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ] *forbade plastering over the graves, sitting on them and building over them.* This was narrated by [Imām] Muslim in his Saheeh [Muslim] and [Imām] at-Tirmidhi, and [Imām] an-Nasa’i, added with an authentic chain of narrators, [‘and writing on them].’
Majmū Fatāwa wa Maqā’lāt 4/337 | Shaykh ‘Abdul-‘Azeez bin Bāz [may Allāh have mercy on him].