It has long been thought that starspots are not present in the A and B stars because magnetic fields cannot be generated in stars with radiative envelopes. Space observations show that a considerable fraction of these stars vary in light with periods consistent with the expected rotation periods. Here we show that the photometric periods are the same as the rotation periods and that starspots are the likely cause for the light variations. This discovery has wide-ranging implications and suggests that a major revision of the physics of hot stellar envelopes may be required.