First thing to clear up is whether you are looking to go to the beach, or to Kennedy Space Center -- two very different day trips, even though they are very close to each other.
For beaches, the choice is between Atlantic beaches (east coast) with real ocean waves and the Gulf of Mexico (west coast) which has much quieter water. To me, both are pretty, either can be very crowded or quite tranquil depending on where and when you go, and both are great -- just different.
On the east coast, the Port Canaveral beaches are no more than an hour from WDW, Cocoa Beach (because you have to go through downtown Cocoa and a more developed area) takes an hour.
Canaveral National Seashore (a National Park Service site) will take a little longer -- maybe 90 minutes. It is exactly as SarahKate describes it. It's one of Central Florida's many "best kept secrets." For info,
www.nps.gov/cana
The closest west coast beaches are about 2 hours away, possibly a little longer because of major highway construction in downtown Tampa. Although we enjoy the gulf beaches too, a day trip from Orlando returning at the end of the day through Tampa rush hour would not be my choice.