The overarching objective of this article is to describe the Swedish public's knowledge about HIV and attitudes toward people living with HIV during the period 1987-2011. Within the framework of this objective, the article also directs a special focus at the association between knowledge about HIV transmission and attitudes toward people who are HIV positive. The study is based on the results of a questionnaire sent to a stratified random sample on eight occasions between 1987 and 2011. The study population comprises the Swedish general public aged 16-44 and is stratified on the basis of the respondents' age, with each of five age groups (16-17, 18-19, 20-24, 25-34, and 35-44) comprising 20% of the study respondents. A total of 21,027 individuals have completed the questionnaire in the eight surveys. The survey instrument is relatively short and comprises 27 questions on knowledge, attitudes and sexual behaviour relating to HIV. The eight surveys show that the public's knowledge about HIV and its different transmission routes is high and has increased over time. Above all there has been an increase in the level of knowledge about how HIV is not transmitted between people. However, the public's knowledge about the infectiousness of individuals receiving treatment for HIV infection is low. Public attitudes toward people with HIV have also undergone a clear shift over time, toward increased tolerance and a decline in the level of fear, especially in social situations. Despite this, a residual suspicion and stigmatisation can be seen in the public's attitudes to people who are HIV positive. This is most obvious from the questions that link HIV to sexuality and here the changes are very modest over time. Public knowledge about HIV and its transmission routes has increased between 1987 and 2011. Attitudes toward people who are HIV positive have generally become more tolerant and positive, not least in relation to different social situations. The fear of becoming infected has declined. At the same time there remains a stigma, which continues to direct suspicion at people who are living with HIV and to ascribe them negative characteristics and behaviors that are based on prejudice. The results show, however, that the public's attitudes toward same-sex relationships are clearly more accepting today than they were previously, and that the symbolic association between HIV and this group is tending to become weaker.