Yes, if your online course is from a credible source, has a certification or other credential and is relevant for the professional position you are applying to, then you can mention it on your resume.