What am I?

I am bought by the yard but worn by the foot. What am I?