What kind of creature was Dobby in the ‘Harry Potter’ saga?

Question: What kind of creature was Dobby in the ‘Harry Potter’ saga?

Choices:

A goblin
An elf
A hobbit
A human

Correct answer:

An elf