Why do betta fish float near the top of tank?

There are several reasons why betta fish might float near the top of the tank:

1. Labyrinth organ: Betta fish have a labyrinth organ, which is a specialized respiratory organ that allows them to breathe air from the surface of the water. This organ is located near the top of their head, so they need to be able to reach the surface in order to breathe.

2. Oxygen levels: Betta fish need a certain amount of oxygen in the water to survive. If the oxygen levels in the tank are too low, they may float near the top of the tank in an attempt to get more oxygen.

3. Water temperature: Betta fish are tropical fish and prefer warm water. If the water temperature in the tank is too cold, they may float near the top of the tank in an attempt to find warmer water.

4. Stress: Stress can cause betta fish to float near the top of the tank. This can be caused by a number of factors, such as overcrowding, poor water quality, or incompatible tank mates.

If your betta fish is floating near the top of the tank, it's important to try to identify the cause so that you can take steps to correct the problem.