at STP, chlorine is a gas but bromine is a liquid. why is this?

Lighter elements tend to be gases, heavier elements tend to be solids, and those in between tend to be liquids.(By the way, did you know that there are ONLY two elements in the entire periodic table that are liquids at room temperature. One is bromine, the other is --you look it up.) Boiling points (and that's really what we are talking about) vary because of attractive forces between the atoms/molecules and because of their molecular weights. In the case of the halogens (group VIIA or group 17 depending upon the system you are using), you will note that F is a gas, Cl is a gas, Br is a liquid, and I is a solid. That series is followed almost exclusively because of the increasing mass of the atoms (F2 at 38, Cl2 at 71. Br2 at almost 160, and I2 at about 254.)

is the other element mercury?

Mercury it is. MANY people will tell you that there are more than two elements that are liquid at room T. Cs, Fr, and Ga come close but their melting points are higher than what we normally call room temperature. You can check them out at this site.

http://www.webelements.com/

The difference in physical state (gas vs liquid) of chlorine and bromine at standard temperature and pressure (STP) can be explained by their respective intermolecular forces.

Chlorine (Cl2) is a diatomic molecule, meaning it is composed of two chlorine atoms bonded together. Chlorine gas exists as a gas at room temperature and STP due to the relatively weak intermolecular forces between its molecules. The molecules are held together by weak van der Waals forces and exhibit no polarity, resulting in weak attractions between the molecules. This allows chlorine to easily overcome these weak forces and exist as a gas.

On the other hand, bromine (Br2) is also a diatomic molecule composed of two bromine atoms bonded together. However, the difference lies in the strength of the intermolecular forces between bromine molecules. Bromine exhibits relatively stronger van der Waals forces compared to chlorine. It has larger and heavier molecules, resulting in stronger intermolecular attractions. As a result, bromine molecules require more energy to overcome these intermolecular forces and transition from a liquid to a gas phase.

Therefore, at STP, chlorine is a gas because the weak van der Waals forces are easily overcome, while bromine is a liquid due to the stronger intermolecular forces that hold its molecules together.