I want to keep in iCloud.
Are you using iCloud Photo Library?
iCloud Photo Library is for syncing. If it is enabled on your iPad, so you you use the Photos.app to access iCloud Photo Library, deleting a photo from the iPad will delete it also from iCloud.
To save storage on the iPad, enable "Optimize storage". The full sized originals will only be stored in iCloud, and your iPad will keep smaller, optimized versions.
The only way to delete the photos from the iPad completely and keep them in iCloud is to disable iCloud Photo Library on the iPad. Then the photos will remain in iCloud when you remove them from the iPad. But you can no oner use the Photos.app on the iPad to access them. You have to use the web interface at www.icloud.com.
The iOS version of www.icloud.com is different from the desktop version. The iOS devices iPhone or iPadandwill not open www.icloud.com directly. You will have to click the circular arrow in the URL field and click "Request Desktop Site" to be able to use the Photos.app or other apps at iCloud.com from your mobile device.