A capping device and method for a print head for an inkjet printer are disclosed. The capping device has a head cap to seal the print head during the printing standby mode. The head cap has a through hole to allow a sealed portion formed between the head cap and the print head to fluidly communicate outside of the head cap. The through hole is respectively disposed at an inner wall and outer wall of the head cap. Due to the through hole, an air path is formed in the head cap to allow a sealed portion between the print head and the head cap to fluidly communicate with the outside. Even if the air in the sealed portion is heated and expanded, the pressure therein does not increase.