In this paper, a dual polarization antenna with broadband characteristics is proposed, which is designed based on metasurface elements. Each element is loaded with PIN diodes, and the polarization mode of the elements can be switched by controlling the working state of the diodes at different positions. The relative bandwidth of the element operating in x-polarization mode is 28.9%, and the relative bandwidth in y-polarization mode is 24.5%. By using $20\times 20$ metasurface elements to form an array and controlling the diode to change the array encoding, the antenna can achieve beam scanning from 0 to 60° in two polarization modes.