Go to the iTunes preferences and make sure that the setting is checked to store music in the cloud. Sorry I can’t remember exactly what it says. I am without my computer at the moment.
I assume you are using iTunes Match. This should match all of your music with Apple servers and it will upload music they don’t match.
Once all of your music is either matched or uploaded, you can select the songs, right click on them and choose remove download.
Edit: of course any music you have purchased from the iTunes Store will be available online as well and will show as purchased.
iTunes will ask if you want to remove the songs from your computer. Answer yes. Then will ask if you want to remove the songs from iCloud. Choose no.
You will still be able to play all of your music, but it will just stream it.