How to split a page into separate files? that is, so that the header, footer, and others are stored in separate files and, if necessary, connected to the page. Is it possible to lay it down with html? If not, then through js, jquery
3 answers
You can work with frameworks. Splitting a single dialog box in the browser into multiple blocks. Create a separate file with a list of actions, and then in the main file, make a link to this file / files.
<frameset= cols , rows =??? > <frame src = " " > </frameset> If the goal is to build a simple website on several pages, and in order to make it easier to edit some common html-blocks, you can use another technology such as SSI, which does not require the use of any programming languages, but only so that it is enabled on the server. Just in the file, for example index.html, connect your blocks:
<!--#include virtual="header.html"--> <!--#include virtual="content.html"--> <!--#include virtual="footer.html"--> I threw in a small gulp based builder, it may come in handy:
https://github.com/MedvedevWeb/gulp-html-builder
In src / pug, everything is actually what you have to work with, then you will only have to deal with pug (and gulp for the future)
<? include('../main.html') /><? include('../main.html') />- Herrgott