Final answer:
In William Shakespeare's 'Twelfth Night,' the character Malvolio wears yellow stockings and cross-garters to impress Lady Olivia as a result of a prank.
Step-by-step explanation:
The character who wears yellow stockings to impress a lady appears in William Shakespeare's comedic play Twelfth Night. The character is Malvolio, the steward, who is tricked into believing that wearing yellow stockings and cross-gartering will make him attractive to his employer, Lady Olivia. This situation unfolds in Act II, Scene 5 of the play and is pivotal to the comedic misunderstandings and character interactions that drive the plot forward. Malvolio's misconception is part of a practical joke played on him by other characters who aim to punish his haughty attitude.