The adoption of online learning approach in education is becoming more popular around the world to overcome the time and spatial barriers of traditional face-to-face learning. The Coronavirus Disease 2019 (COVID-19) pandemic has affected the normality of learning and avoiding face-to-face activities is one tactic to minimise the spread of COVID-19. This study investigated the perception of online learning from students' and teachers' perspectives compared to traditional face-to-face learning during the COVID-19 pandemic. Ten focus group interviews were conducted, nine of which involved fifty-five students, while the remaining one involved eight full-time teachers. All informants were recruited from two Hong Kong tertiary educational institutions: the Hong Kong Community College, and the School of Professional Education and Executive Development of The Hong Kong Polytechnic University. The Community of Inquiry model and Pedagogy-driven, Learner-Centred, Objective-Oriented and Technology-Enable model were adopted as a framework to analyse students' and teachers' perceptions of social presence, teaching presence, and cognitive presence. Qualitative content analysis indicated that teacher-student and student–student interactions were the biggest challenge in online learning, and this affected the acquisition and application of knowledge in terms of cognitive presence. Other factors such as personality, learning environment, and technical skills affected the perception of both online and face-to-face learning. Copyright © 2023 Springer Nature.