The coronavirus disease 2019 (COVID-19) pandemic has affected educational institutions and instructors in an unprecedented way. The majority of educational establishments were forced to take their courses online within a very short period of time, and both instructors and students had to learn to navigate the digital array of courses without much training. Our study examined factors that affect students' attitude toward online teaching and learning during the COVID-19 pandemic. It is different from other online learning studies where online courses are mostly a method of choice, with suitable support from institutions and expectation from instructors and students, rather than a contingency. Under this specific environment, we utilized an online survey to collect students' feedback from eleven universities across Hong Kong. Using partial least squares for analysis on the 400 valid samples we received, we found that peer interactions and course design have the most salient impact on students' attitude, whereas interactions with instructors has no effect at all on students' attitude. Furthermore, we also provide suggestions on using the existing technologies purchased during COVID-19 for a more sustainable learning environment going forward. Copyright © 2021 by the authors.