A piece of writing which teaches morals is "didactic". It is intended to instruct or educate the reader or audience about a particular moral or ethical issue. Didactic writing can take many forms, including fables, parables, allegories, and even some forms of poetry and drama. The primary purpose of didactic writing is to teach a lesson or impart a moral, rather than simply to entertain or amuse.