How to go about and testing the header and make sure all the links in the header(menu) are not broken

How to go about and testing the header and make sure all the links in the header(menu) are not broken and all the pages work and their heading is expected as it is in javascript protractor? Is there a way i can write a loop that can test the header and the footer for example?

For example i want to test the header on this h and m website - http://www2.hm.com/en_ca/women.html