Due to its flexibility, accessibility and the increasing importance of digital literacy, online learning has gained priority in the last few years. However, several challenges have led students to resist it. Predicting students’ attitudes towards online learning could assist educators and educational institutions in addressing these challenges and enhancing its effectiveness. This paper presents a Learning Attitude Prediction Model (LAPM) that can detect students’ attitudes from their informal Arabic texts. To generate the desired LAPM, five machine learning algorithms and three different approaches for text representation are employed. In addition, handling stop words is another important issue when dealing with informal Arabic text. Two scenarios are commonly adopted: preserving and eliminating stop words. The best result was obtained when using a support vector machine (SVM) classifier coupled with the term frequency-inverse document frequency (TF-IDF) approach and preserving stop-words, achieving an F1-score of 85.4%. Therefore, an effective LAPM could be developed to predict students’ attitudes. Using LAPM, educators and educational institutions can monitor students’ attitudes toward online learning and provide personalized support to individual students. Consequently, an enhancement in student satisfaction and an improvement in academic achievement could be achieved.