What does the href attribute do in this piece of code?

It allows the link element to find the style sheetIt tells the link element what kind of file to include

The href attribute defines the location of the style sheet.