What's the meaning of this Hamlet quote: "There's rosemary, that's for remembrance..."?
This is part of a speech given by Ophelia, Hamlet's lover, in what is considered her infamous "mad scene." She enters the room and begins singing and reciting lyrics, causing concern to Queen Gertrude and King Claudius. She then leaves briefly, and re-enters, this time with her brother Laertes present. She speaks to each of them, as well as passing out sprigs of herbs and flowers. She gives the rosemary to Laertes, saying "There's rosemary, that's for remembrance. Pray, love, remember. And there is pansies, that's for thoughts." She is asking her brother to remember her, perhaps in their youthful happiness; and also asking him to remember her because it is implied she is planning to commit suicide by drowning (although the play is not clear if this was accidental or deliberate).
The art of applying certain meaning to various kinds of flowers and plants was very common in Shakespeare's day, but this is one place in his plays where it is used with very specific detail. Many paintings representing Ophelia show her with an armful of wildflowers and herbs, some before she has drowned herself, and some after, inspired by this famous scene. One of the most well known of these is by the English painter John William Waterhouse, who painted a number of Shakespearean subjects. In this painting we see Ophelia with a wide-eyed distraught look, carrying a variety of freshly picked flowers in the fold son her dress.