CPR classes? For babies

my baby is almost here and I do not know much about CPR. Would you ladies recommend an online class to be the same as if I took it in person? or would it be better I take one live?