A method for detecting and typing human papillomavirus, comprising the combined use of the two-step (duplicate) multiplex nested PCR technique with multiple markers using general consensus oligonucleotides (first stage) followed by multiple specific oligonucleotides (second stage) and their components (reagents and reaction conditions) for simultaneously detecting 40 human papillomavirus types present in fluids and human tissue samples, in a single reaction tube for capillary electrophoresis detection.