Yes, Spain is a European country and is located in southwestern part of the continent.
The country, which is officially known as the Kingdom of Spain, is located on the Iberian Peninsula. But, two archipelagos of the country and two cities are located out of Europe. These are the cities of Ceuta and Mellila and the two large archipelagos are the Balearic Islands and the Canary Islands. Spain is considered the only country in Europe, that has a boundary with an African nation. Five percent of Spain’s population lives in its African territory. Of these, the majority live in the Canary Islands.
Melilla is an autonomous city and is located on the north coast of Africa. It covers an area of 4.7 square miles and has a population of 78,476, as of 2011. Spanish is the official language of the city, while Riffian-Berber is widely spoken. Morocco, which claims Melilla as its own territory, says the city is an occupied territory.
The autonomous city of Ceuta is located on the north coast of Africa and covers an area of 7.1 square miles. The city shares its land border with M’diq-Fnideq Prefecture, Morocco. Spanish is the official language of the city, while between 40 to 50 percent of the population speaks Darija Arabic.
The Canary Islands are located in the Atlantic Ocean and is an autonomous community of Spain. Also known as the Canaries, the islands are located approximately 62 miles west of Morocco. The archipelago covers a total area of 2,893 square miles and as of 2016, was home to 2,101,924 people.
The Balearic Islands are located in the Western Mediterranean. An autonomous community and province of Spain, the Balearic Islands cover an area of 1,927 square miles. As of 2016, the population of the Balearic Islands was 1,107,220 people. Spanish and Catalan are the co-official languages in the islands.