A series of laboratory experiments are conducted to investigate liquid sloshing in a rectangular tank with a vertical baffle of varying elasticity under horizontal excitations. Image processing techniques are introduced to track baffle displacement, as well as to identify the free surface and the bubble. Dye visualization is employed to reveal the vortex behavior around the baffle. The air entrainment mechanism, including jet impinging, air cavity formation and deformation, and turbulent mixing, is analyzed. Moreover, the study investigates the effect of baffles with different stiffness on suppressing liquid sloshing across a wide range of excitation frequencies. The results show that the peak frequencies of the maximum free surface elevation-frequency curves correspond to the first natural frequency of fluid, the sub-resonance frequency, and the wet natural frequency of the elastic baffle. It is also found that the elastic baffle can effectively reduce liquid sloshing within a certain frequency range and balance the slamming impact both on the wall and the baffle, providing promising prospects for its practical applications.