The aim of this study was to evaluate the effect of an educational intervention concerning human papillomavirus (HPV) directed at Swedish first year high school students. The intervention consisted of a class room lesson, a website and a folder. Outcome variables were knowledge of HPV and attitudes to preventive methods such as HPV vaccination, condom use and Pap smear testing. An intervention group (n = 92) was matched with two comparison groups (n = 184). At baseline, the median score for HPV knowledge was one out of 10 in both groups. At follow-up, the median knowledge score had increased to six in the intervention group, but was still one in the comparison group (P < 0.001). Attitudes to HPV vaccination, condom use and Pap smear testing remained the same (P > 0.05). In conclusion, a short school-based intervention can greatly increase the students' knowledge about HPV, but attitudes and behaviours are less easy to influence.