The etymology of the name Denmark (Danish: Danmark), and especially the relationship between Danes and Denmark and the unifying of Denmark as a single kingdom, is a subject which attracts some debate. In Old Norse, the country was called Danmǫrk, referring to the Danish March, viz. the marches of the Danes. The Latin name is Dania.
According to popular legend, however, the name Denmark, refers to the mythological King Dan. There are also a number of references to various Dani people in Scandinavia or other places in Europe in Ancient Greece and Roman accounts (like Ptolemy, Jordanes, and Gregory of Tours), as well as some medieval literature (like Adam of Bremen, Beowulf, Widsith and Poetic Edda).
Most handbooks derive the first part of the word, and the name of the people, from a word meaning "flat land", related to German Tenne "threshing floor", English den "low ground", Sanskrit dhánuṣ- (धनुस्; "desert"). The -mark is believed to mean woodland or borderland (see marches), with probable references to the border forests in south Schleswig, maybe similar to Finnmark, Telemark, or Dithmarschen.
Etymology of Denmark Wikipedia
Some of the earliest descriptions of the origin of the word 'Denmark', describing a territory, are found in the Chronicon Lethrense (12th century), Svend Aagesen (late 12th century), Saxo Grammaticus (early 13th century) and the Ballad of Eric (mid 15th century). There are, however, many more Danish annuals and yearbooks containing various other details, similar tales in other variations, other names or spelling variations.
The Chronicon Lethrense explains how the Roman Emperor Augustus battled Denmark in the time of David, Denmark consisted of seven territories Jutland, Funen, Zealand, Møn, Falster, Lolland and Skåne which were governed by King Ypper of Uppsala. He had three sons, Nori, Østen and Dan. Dan was sent to govern Zealand, Møn, Falster, and Lolland, which became known jointly as Videslev. When the Jutes were fighting Emperor Augustus they called upon Dan to help them. Upon victory, they made him king of Jutland, Funen, Videslev and Skåne. A council decided to call this new united land Danmark (Dania) after their new king, Dan. Saxo relates that it is the legendary Danish King Dan, son of Humbli, who gave the name to the Danish people, though he does not expressly state that he is also the origin of the word "Denmark". Rather he tells that England ultimately derives its name from Dan’s brother Angel.
The earliest mention of a territory called "Denmark" is found in King Alfred the Great's modified translation into Old English of Paulus Orosius' Seven Books of History Against The Pagans ("Historiarum adversum Paganos Libri Septem"), written by Alfred when king of Wessex in the years 871–899. In a passage introduced to the text by Alfred, we read about Ohthere of Hålogaland’s travels in the Nordic region, during which 'Denmark [Denamearc] was on his port side... And then for two days he had on his (port side) the islands which belong to Denmark'.
In the Treaty of Heiligen, which was signed at Heiligen in 811 between Denmark and the Frankish empire, it mentions King Hemming and Charlemagne. Based on the terms of the accord, the southern boundary of Denmark was established at the Eider River. Moreover, the treaty confirmed the peace established by both signatories in 810.
The first recorded use of the word "Denmark" within Denmark itself is found on the two Jelling stones, which are rune stones believed to have been erected by Gorm the Old (c. 955) and Harald Bluetooth (c. 965). The larger stone of the two is popularly cited as Denmark's baptismal certificate (dåbsattest), though both use the word "Denmark", in the form of accusative ᛏᛅᚾᛘᛅᚢᚱᚴ "tanmaurk" ([danmɒrk]) on the large stone, and genitive "tanmarkar" (pronounced [danmarkaɽ]) on the small stone. The inhabitants of Denmark are there called "tani" ([danɪ]), or "Danes", in the accusative.
In the Song of Roland, estimated to have been written between 1040 and 1115, the first mention of the legendary Danish hero Holger Danske appears; he is mentioned several times as "Holger of Denmark" (Ogier de Denemarche).