This research employs a quantitative and cross-sectional approach, utilizing an online survey (N=600), to examine the preferences of Spanish students aged 16 to 18 regarding different modes of education (face-to-face or online). It also explores potential variances based on their place of residence. Additionally, the study identifies the subjects of interest to these students for integration into formal learning and determines their preferred online learning formats. The findings reveal significant differences between students residing in cities with a population of 50,000 or more and those in smaller habitats, particularly in relation to their experiences and evaluations of online education, precisely specific training in received digital technologies, their topics of interest, their self-study learning methods, and their preferred online learning formats. These study outcomes can contribute to the enhancement of online education and better preparedness of the educational system for future challenges that may necessitate the adoption of this instructional mode. Based on our study, several recommendations for online education can be made. Firstly, there is a need for teachers to acquire enhanced digital skills. Secondly, it is important not to assume that young individuals possess inherent digital skills due to their age; instead, it is crucial to emphasize the acquisition of critical digital skills during their education. Thirdly, motivating young students by aligning teaching with their areas of interest should be encouraged, considering their significant habitat preferences. Lastly, interactive methodologies that stimulate students, such as immediate evaluation questionnaires, animations, and interactive exercises, should be prioritized, particularly for students residing in densely populated areas.