A vial containing mercury broke during a chemistry class Wednesday afternoon.