The correct answer is D. no article.

The sentence is about a specific black cap that the speaker liked and bought. Therefore, we do not need to use an article.

A is incorrect because "a" is used to refer to a general or unspecified thing. In this case, the speaker is referring to a specific black cap.

B is incorrect because "an" is used to refer to a singular, countable noun that begins with a vowel sound. In this case, the noun "cap" begins with a consonant sound.

C is incorrect because "the" is used to refer to a specific thing that has already been mentioned or is known to the listener. In this case, the speaker is not referring to a specific black cap that has already been mentioned.

D is the correct answer because it does not use an article. This is because the sentence is about a specific black cap that the speaker liked and bought. Therefore, we do not need to use an article.