Engineering education can reach the desired level if practical laboratory works are given together with the theory. In electrical engineering education, if foundation costs are considered the electrical machine labs become very important. Due to the increasing number of students accessing the university educational structures, the cost of laboratories for didactical electric machine applications is going to be very high. In this study, virtual laboratory, which is found to have wide application field in recent years, is introduced. For this purpose, a virtual electrical machine lab for electrical engineering lab courses is developed. An example of application was presented for the control of synchronous motor and no-load and blocked rotor test of synchronous generator. Moreover, this study explores the learning effect related to different learning styles of web-based virtual lab that has developed in electric engineering students.