Excessive sun exposure, mainly in childhood, represents one of the major skin cancer risk factors. Sun protection habits should start early in life to be effective. The purpose of this study was to investigate knowledge, attitude and sun protection behaviour in parents (P) and in their children (C). The educational intervention addressed the parents of 131 primary school pupils in Valencia, Spain, during the school year 2007-2008. A self-administered pre- and post-intervention questionnaire was handed in during school hours to be filled in by parents. Parents' compliance was very high (88 %). At baseline, regular high-sun-protective-factor (>15) sunscreen use was common (P, 64 %; C, 95 %); wearing clothing (T-shirt: P, 34 %, C, 62 %; hat: P, 29 %, C, 64 %) and sun avoidance at midday (P, 23 %; C, 29 %) were less frequent. Almost 70 % of parents reported difficulties, mainly due to the children's refusal. A high knowledge score (median, 6/7) and a medium/high attitude score (median, 24/30) in parents were observed; however, lifetime sunburn history was generally reported (P, 88 %; C, 24 %). Factors associated with parents' knowledge were a personal history of sunburns and regularly repeating sunscreen application to children (median score: 6 vs 5; p ≤ 0.01) Predictors of a more favourable attitude were female caretakers and having daughters (median score: 30 vs 25 and 25 vs 24, respectively; p ≤ 0.01). A trend towards limited post-intervention positive changes emerged; however, sun avoidance habit decreased (35 vs 20 %, p = 0.01). Despite a high level of parents' knowledge, sun protection in children is not adequate, and sunburns are not uncommon. Unfavourable beliefs and attitudes need to be overcome and quality of messages improved to achieve sun-safe exposure in children.