Children sometimes learn distracting information better than adults do, perhaps because of the development of selective attention. To understand this potential link, we ask how the learning of children (aged 7-9 years) and the learning of adults differ when information is the directed focus of attention versus when it is not. Participants viewed drawings of common objects and were told to attend to the drawings (Experiment 1, 42 children, 35 adults) or indicate when shapes (overlaid on the drawings) repeated (Experiment 2, 53 children, 60 adults). Afterward, participants identified fragments of these drawings as quickly as possible. Adults learned better than children when directed to attend to the drawings; however, when drawings were task irrelevant, children showed better learning than adults in the first half of the test. And although directing attention to the drawings improved learning in adults, children learned the drawings similarly across experiments regardless of whether the drawings were the focus of the task or entirely irrelevant.