Component of the Mediator complex, a coactivator involved in the regulated transcription of nearly all RNA polymerase II-dependent genes. Mediator functions as a bridge to convey information from gene- specific regulatory proteins to the basal RNA polymerase II transcription machinery. Mediator is recruited to promoters by direct interactions with regulatory proteins and serves as a scaffold for the assembly of a functional preinitiation complex with RNA polymerase II and the general transcription factors. {ECO:0000269|PubMed:15249124, ECO:0000269|PubMed:9660976}. This is the function of MED21 (mediator complex subunit 21, Ensembl gene identifier ENSG00000152944).