During the Middle Ages Prague became very important as the capital of the Holy Roman Empire ruled by Charles IV (1316-1378) who was the most powerful ruler in Europe at the time. Charles made Prague a great city, building St Vitus Cathedral, a university, and a famous bridge called Charles Bridge which still exists.