Artificial Intelligence (AI) has the power to improve our lives through a wide variety of applications, many of which fall into the healthcare space; however, a lack of diversity is contributing to limitations in how broadly AI can help people. The UCSF AI4ALL program was established in 2019 to address this issue by targeting high school students from underrepresented backgrounds in AI, giving them a chance to learn about AI with a focus on biomedicine, and promoting diversity and inclusion. In 2020, the UCSF AI4ALL three-week program was held entirely online due to the COVID-19 pandemic. Thus, students participated virtually to gain experience with AI, interact with diverse role models in AI, and learn about advancing health through AI. Specifically, they attended lectures in coding and AI, received an in-depth research experience through hands-on projects exploring COVID-19, and engaged in mentoring and personal development sessions with faculty, researchers, industry professionals, and undergraduate and graduate students, many of whom were women and from underrepresented racial and ethnic backgrounds. At the conclusion of the program, the students presented the results of their research projects at the final symposium. Comparison of pre- and post-program survey responses from students demonstrated that after the program, significantly more students were familiar with how to work with data and to evaluate and apply machine learning algorithms. There were also nominally significant increases in the students' knowing people in AI from historically underrepresented groups, feeling confident in discussing AI, and being aware of careers in AI. We found that we were able to engage young students in AI via our online training program and nurture greater diversity in AI. This work can guide AI training programs aspiring to engage and educate students entirely online, and motivate people in AI to strive towards increasing diversity and inclusion in this field.