Abstract The most fundamental factor in the knowledge and prosperity of students is effective education. Typically, learning and educating can be very costly, time-consuming and with no guaranteed results, but E-learning has solutions to every possible problem. The main objective of the current research was to evaluate the overall attitudes of Darrehshahr high school students toward virtual education and to see if gender results in a significant difference in this attitude. Therefore, 400 (200 male and 200 female) students were randomly selected from the second and third grades of two male and two female high schools in Darrehshahr city in the academic year of 2022-2023. The participants completed a questionnaire that measured their attitude toward virtual education. The one-sample t-test and the Mann-Whitney non-parametric test were used to analyze the collected data. The results showed that the mean attitude of students toward virtual education was significantly positive, with an average score of 2.9823 among male students and 2.8140 among female students. Further analysis made it clear that there was not a statistically significant difference between the two genders in terms of their attitude toward virtual education. Anyhow, based on the current research outcomes it is understood that the advocates of virtual learning are progressively increasing. Keywords: Attitudes, Iranian students, The City of Darrehshahr, Virtual Education.