Does air have mass? I think it does because air takes up space so it is matter and matter has mass.

right you are. To weigh it is a bit tricky. One way is to compress it.