Beyond URL Analysis: Evaluating Content-Based Phishing Detection Using HTML Structural Features
Keywords:
Machine Learning, Cybersecurity, Phishing Detection, HTML Feature Extraction, Content-Based Detection, Model InterpretabilityAbstract
For more than two decades, phishing pages have continued to evade defensive systems through increasingly sophisticated techniques. Most existing approaches combine URL features, telemetry, reputation signals, and HTML content, making it difficult to isolate the contribution of HTML alone. This study investigates whether phishing and legitimate pages can be distinguished using only HTML-derived content features. A balanced dataset of 40,000 pages was constructed through live HTTP retrieval, including 20,000 phishing pages from the verified PhishTank feed and 20,000 legitimate pages from the Tranco top-domain list. Using BeautifulSoup4, each page was represented by 15 HTML-derived features without using lexical URL features, reputation information, or network telemetry. Seven machine-learning classifiers were evaluated using 5-fold stratified cross-validation. Random Forest achieved the best performance with a positive-class F1 score of 0.940 ± 0.002 and a ROC-AUC of 0.983 ± 0.001, while producing a 6.5% false-negative rate and a 5.3% false-positive rate. Feature-importance analysis showed that n_links, n_scripts, n_images, and title_len accounted for approximately two-thirds of the overall importance ranking. An ablation study demonstrated that the five most important features achieved an F1 score of 0.926, 1.5 percentage points below the All-15 ablation result. SHAP analysis and error inspection revealed that structurally rich phishing pages can closely imitate legitimate websites. The findings demonstrate that static HTML structure provides substantial discriminative information for phishing detection while revealing important limitations of content-based approaches. No claims are made regarding temporal, cross-dataset, or adversarial generalization.
References
[1] Anti-Phishing Working Group. Phishing Activity Trends Report: First Quarter 2024. Technical Report, Anti-Phishing Working Group, 2024.
[2] Verizon. 2024 Data Breach Investigations Report: Executive Summary. Technical Report, Verizon Business, 2024.
[3] U. Zara, K. Ayyub, H. Ullah Khan, A. Daud, T. Alsahfi, and S. Gulzar Ahmad. "Phishing Website Detection Using Deep Learning Models." IEEE Access, 12:167072–167087, 2024.
[4] F. Chen, T. Wu, V. Nguyen, and C. Rudolph. "SoK: Large Language Model-Generated Textual Phishing Campaigns: End-to-End Analysis of Generation, Characteristics, and Detection." arXiv preprint arXiv:2508.21457, 2025.
[5] J. L. Wilk-Jakubowski, L. Pawlik, G. Wilk-Jakubowski, and A. Sikora. "Machine Learning and Neural Networks for Phishing Detection: A Systematic Review (2017–2024)." Electronics, 14(18):3744, 2025.
[6] D. Popescul and L. D. Radu. "AI in Phishing Detection: A Bibliometric Review." Frontiers in Artificial Intelligence, 8:1496580, 2025.
[7] D. M. Linh and T. C. Hung. "A Feature-Engineered Dataset of Benign and Phishing URLs for Machine Learning and Large Language Models Evaluation." Data in Brief, 63:112162, 2025.
[8] R. S. Rao, C. Kondaiah, A. R. Pais, and B. Lee. "A Hybrid Super Learner Ensemble for Phishing Detection on Mobile Devices." Scientific Reports, 15(1):16839, 2025.
[9] M. Mia, D. Derakhshan, and M. M. A. Pritom. "Can Features for Phishing URL Detection Be Trusted Across Diverse Datasets? A Case Study with Explainable AI." In Proceedings of the 2024 11th International Conference on Networking, Systems and Security (NSysS 2024), pp. 137–145, 2025.
[10] J. Kim, Y. Kim, S. Lee, and S. Cho. "Privacy-Preserving Phishing Detection in HTML Code Using Split Learning." In International Conference on ICT Convergence, pp. 173–178, 2024.
[11] M. Murhej and G. Nallasivan. "Component Features Based Enhanced Phishing Website Detection System Using EfficientNet, FH-BERT, and SELU-CRNN Methods." Frontiers in Computer Science, 7:1582206, 2025.
[12] K. Manguli, C. Kondaiah, A. R. Pais, and R. S. Rao. "GraPhish: A Graph-Based Approach for Phishing Detection from Encrypted TLS Traffic." Journal of Information Security and Applications, 94:104216, 2025.
[13] Furkan Çolhak, Mert İlhan Ecevit, Bilal Emir Uçar, Reiner Creutzburg, and Hasan Dağ. "Phishing Website Detection Through Multi-Model Analysis of HTML Content." In Proceedings of the International Conference on Theoretical and Applied Computing (ICTAC 2024), pp. 171–184. Springer, 2025.
[14] Georg Goldenits, Philip Koenig, Sebastian Raubitzek, and Andreas Ekelhart. "Small Language Models for Phishing Website Detection: Cost, Performance, and Privacy Trade-Offs." Journal of Cybersecurity and Privacy, 6(2):48, 2026.
[15] M. Wang, L. Song, L. Li, Y. Zhu, and J. Li. "Phishing Webpage Detection Based on Global and Local Visual Similarity." Expert Systems with Applications, 252:124120, 2024.
[16] Fujiao Ji, Kiho Lee, Hyungjoon Koo, Wenhao You, Euijin Choo, Hyoungshick Kim, and Doowon Kim. "Evaluating the Effectiveness and Robustness of Visual Similarity-Based Phishing Detection Models." In 34th USENIX Security Symposium (USENIX Security 25), pp. 3201–3220, Seattle, WA, August 2025. USENIX Association.
[17] Raheleh Ghadami and Javad Rahebi. "An Explainable Hybrid Deep Learning-Optimization Framework for Robust Phishing Attack Detection Using GAN and Transformer-Based Feature Learning." Ain Shams Engineering Journal, 16(12):103745, 2025.
[18] M. Al-Falah. Beyond URL Analysis: Evaluating Content-Based Phishing Detection Using HTML Structural Features. GitHub Repository: https://github.com/MarwanMAlfalah/content-phishing-detection, 2026.
[19] Yousif A. Alhaj, Marwan M. Al-Falah, E. S. Gebel, Naif M. Al-Falah, Abdulrahman Mohammed Hussein Obaid, Mijahed Aljober, Hamzah A. M. Ali, Ismail I. Al-Ahmed, and Somaia Yaseen Ahmed Al-Gwaini. Beyond URL Analysis: Evaluating Content-Based Phishing Detection Using HTML Structural Features. Zenodo Dataset, Version 1.0.0. DOI: 10.5281/zenodo.20315649, 2026.
[20] Aditya Kulkarni, Vivek Balachandran, Dinil Mon Divakaran, and Tamal Das. "From ML to LLM: Evaluating the Robustness of Phishing Web Page Detection Models Against Adversarial Attacks." Digital Threats: Research and Practice, 6(2):1–25, Article 10, 2025.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Yousif A. Al-Haj, Marwan M. Al-Falah, Elena S. Gebel, Naif M. Al-Falah, Abdulrahman Mohammed Hussein Obaid, Mijahed Aljober, Hamzah A. M. Ali, Ismail I. Al-Ahmed, Somaia Yaseen Ahmed Al-Gwaini (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.
