High temporal resolution is necessary to resolve the rapidly changing patterns of brain activity that underlie mental function. Electroencephalography (EEG) provides temporal resolution in the millisecond range. However, traditional EEG technology and practice provide insufficient spatial detail to identify relationships between brain electrical events and structures and functions visualized by magnetic resonance imaging or positron emission tomography. Recent advances help to overcome this problem by recording EEGs from more electrodes, by registering EEG data with anatomical images, and by correcting the distortion caused by volume conduction of EEG signals through the skull and scalp. In addition, statistical measurements of sub-second interdependences between EEG time-series recorded from different locations can help to generate hypotheses about the instantaneous functional networks that form between different cortical regions during perception, thought and action. Example applications are presented from studies of language, attention and working memory. Along with its unique ability to monitor brain function as people perform everyday activities in the real world, these advances make modern EEG an invaluable complement to other functional neuroimaging modalities.