I am creating an HTML-CSS-JavaScript-PHP contact form and I have an HTML file which has become very long for me to work with.
Also, some of the lines are by themselves very long due to nesting and requires significant horizontal scrolling to be edited and the overall file is just hard for me to read and edit.
I want to have one main HTML file which contains inclusions of other HTML files (modular HTML).
HTML file inclusion was supported in the past (in HTML itself), but no more for some reason, yet I know that it can be done with JavaScript.
What would be a very modern (ES 10,11,12?) vanilla JavaScript way to split a long HTML file into several?