For the initiation of transcription, RNA polymerase II (Pol II) assembles with general transcription factors on promoter DNA to form the pre-initiation complex (PIC). Here we report cryo-electron microscopy structures of the Saccharomyces cerevisiae PIC and PIC-core Mediator complex at nominal resolutions of 4.7 Å and 5.8 Å, respectively. The structures reveal transcription factor IIH (TFIIH), and suggest how the core and kinase TFIIH modules function in the opening of promoter DNA and the phosphorylation of Pol II, respectively. The TFIIH core subunit Ssl2 (a homologue of human XPB) is positioned on downstream DNA by the 'E-bridge' helix in TFIIE, consistent with TFIIE-stimulated DNA opening. The TFIIH kinase module subunit Tfb3 (MAT1 in human) anchors the kinase Kin28 (CDK7), which is mobile in the PIC but preferentially located between the Mediator hook and shoulder in the PIC-core Mediator complex. Open spaces between the Mediator head and middle modules may allow access of the kinase to its substrate, the C-terminal domain of Pol II.