What is the definition of etymology?

A.
the study of ancient Greek legends

B.
the study of word parts: prefixes, roots, and suffixes

C.
the study of Greek heroes and epic poems

D.
the study of the history and meaning of words