Pediatricians generally do not prescribe antibiotics since croup is mostly a viral infection. However, in some circumstances, doctors may prescribe antibiotics if croup happens due to a bacterial infection or to prevent secondary infection in babies.