AbstractThe research purpose is to analyze how block‐based programming, introduced in parallel with classical school education, will be an effective tool for developing environmental awareness among students. The research proposes a well‐developed theoretical program on environmental literacy and a practical Science, technology, engineering, and mathematics (STEM) project creating an eco‐house model with a weather station and alternative energy sources in a regular secondary school in Shanghai. The sample involved school students of the seventh grade, equally divided into two groups: the control group (learnt only a theoretical program) and the experimental group (learnt both a theoretical program and a practical STEM project). At the end of the school year, students passed an environmental literacy test. The differences between the control and experimental groups were statistically significant. The experimental group has the advantage in all parameters: it has the highest scores and a large number of students who showed a high and very high level of knowledge. The results prove the methodology effectiveness of the experimental group in terms of developing sensitivity to the environment, cognitive abilities, ecological analysis, and preserving the environment. It was found that overall academic performance correlates significantly with both test scores and project scores. The highest scores were for the project, which indicates the effectiveness of block‐based programming in the learning of the experimental group, their implementation of new ideas based on the acquired knowledge, success in decision‐making, and experience that went beyond previous achievements.