Why (adverb) did (verb) the (article) happy (adjective) dog (noun) joyfully (adverb) wag (verb) its (pronoun) tail (noun)?
Let's break down each part:
* Why: Adverb (asking the reason)
* did: Verb (past tense of "do")
* the: Article (determiner)
* happy: Adjective (describing the dog)
* dog: Noun (subject of the verb)
* joyfully: Adverb (describing the action)
* wag: Verb (the action)
* its: Pronoun (replacing "the dog's")
* tail: Noun (object of the verb)