Would my photos and contacts still be on my iphone of I reset it?

I thought of I reset my iPhone and used my iCloud to sign on, would my photos and contacts be on if they were backed up on the iCloud?

I would recommend that you copy the photos onto a computer as a backup first.