Slovaks are a nation that had to wait a loooong time to have an independent country. Actually, their first independent country was created only in 1918. It makes it even more interesting, how a small nation could survive with its identity. As it happens in the World history, the big(ger) nations and countries are who those usually influence the history of the smaller ones. North of the Tatras, this is Poland, Germany, Russia. South of the Tatras - Austria, Hungary or Czechs. The brave Huns, the nightmare of Slovaks, conquered the territories of modern Slovakia as early as in the 11th century.
Since that time, the Slovak territories shared the history of Hungary until 1918 - so during 10 long centuries! The local languages, culture, identity survived mainly because of the geography: the mountains and a difficult (especially compared to the Hungarian plains, south from Slovakia) climate were not places where many immigrants would like to settle. The cities and plains were usually of mixed or non-Slovak populations, while the mountain towns and villages were populated by the Slovaks. With the attempts of a stronger magyarisation in the mid-19th century (the Spring of Nations), the Slovak identity rose. In their fight for independence, the closer relation with the Czech was rather a rational choice (to find an ally against a bigger enemy). Even today, the history is a difficult issue between Slovakia and Hungary. But not only the history - a part of the Hungarian plain that was given to Czechoslovakia in 1918 (so that it had some fertile lands and not only mountains) is still predominantly Hungarian-speaking today.