Taking baby to the beach

I realize babies aren’t supposed to wear sunscreen until they’re at least six months. Would it be ok to take a four month old to the beach if we keep her under the umbrella/in a tent and out of the sun as much as possible? We have a little hat for her too. I just don’t want her to get burned, but husband and I are dying for a beach day. What do you think?