Gardasil contains proteins from HPV Types 6, 11, 16, and 18, so in theory, it should offer protection against these four types of HPV, as well as cancers caused by HPV (such as anal cancer and cervical cancer).
It’s worth noting, though, that there are hundreds of different strains of the human papillomavirus, most of which Gardasil does not prevent.