We found that the values of absorption edge shifts are decreased and increased with the increasing doping level, which shows that the optical band gap of the ZnO:Co films is broadened after doping with cobalt from 3.25 to 3.36 eV and the optical band gap of the ZnO:In films is narrowed after doping with indium from 3.25 to 3.18 eV.