The pharynx (Fig. 8.6) is a chamber in the shape of a half-cylinder with walls formed by muscles and fascia. Above, the walls are attached to the base of the skull, and below to the margins of the esophagus. On each side, the walls are attached to the lateral margins of the nasal cavities, the oral cavity, and the larynx. The two nasal cavities, the oral cavity, and the larynx therefore open into the anterior aspect of the pharynx, and the esophagus opens inferiorly.