the images that are retouched in lightroom cc are a resolution of 300. But when a web gallery is created the images become 240 resolution. How can I set up web gallery to keep images at 300 resolution?
For web images, ppi is irrelevant, and has no effect on the image, which will display according to its pixel dimensions, regardless of what the ppi is set to.
Ppi (pixels per inch) is optional metadata, which is used by printer drivers to calculate physical dimensions in a print.
Pixel dimensions divided by ppi = physical dimensions in inches.