Background: COVID-19 challenges world governments. In Spain, measures to contain the pandemic are novel, and include the possibility of contracting Nursing and Medical students who might not be ready or willing to treat infected cases. Objectives: To study Spanish Nursing and Medical students' knowledge about COVID-19 community transmission prevention measures, treating infected patients, and their confidence and willingness to treat cases. To learn their views about the first public health policy measures adopted by the Spain government to contain the pandemic. Design: Cross-sectional study. Settings and participants: 237 Spanish Nursing and Medical students. Methods: An online questionnaire was designed on the knowledge, confidence and willingness to treat, and the suitability of the public health policy measures adopted in Spain. The data were collected through social networks. The results were compared according to their university degree. Results: Knowledge about community prevention was suitable, unlike knowledge about treating infected patients. Students had little confidence in treating cases, but their willingness and moral responsibility were high. Very few significant differences were found in their university degrees. Medical students evaluated the measures taken in Spain more favorably. Conclusions: Students' knowledge about COVID-19 community prevention measures was adequate, but not about preventive measures when treating patients with COVID-19. They felt little confidence despite being willing to treat infected patients. The sample agreed with the public health measures adopted in Spain.