What is the literary term for giving human attributes to a non-human object or animal?

Personification is giving human qualities to animals or objects. Example: a smiling moon, a jovial sun

Related questions