The anterior and posterior muscles of the thigh are summarized in 3 sentences:
Anterior: The quadriceps femoris muscle is located on the anterior thigh and extends the knee. The sartorius muscle runs obliquely across the anterior thigh. The gracilis and semitendinosus muscles make up the pes anserinus on the medial thigh.
Posterior: The hamstring muscles - the biceps femoris, semitendinosus, and semimembranosus muscles - are located on the posterior thigh and flex the knee. The gluteal muscles originating from the pelvis insert on the posterior thigh and extend and laterally rotate the thigh.