According to the Anglo-Saxon Chronicle, written in the 9th century AD, the first king of a united England was Alfred: "all of the English people (all Angelcyn) not subject to the Danes submitted themselves to King Alfred." Before that time, England was divided into several small "kingdoms," each headed by its own king. When the Danes invaded England, many of these kingdoms united under Alfred in order to better defend themselves against the Danes.
The first king to rule over all of England--that is, with no areas under Danish control--was Edward the Confessor. Edward was the last of the Anglo-Saxon kings to rule before William the Conqueror invaded in 1066 and brought the nation under Norman rule.
Click on any of the links below for more information.