How to add HTML code from external file as a part to another HTML code?

In my project, I have several pages with the same structure (header, menu, etc)
Can I make an external HTML file with a repeating part of my code and just some kind of insert code from the external file to the current HTML code as a part of it?

Hi, from my humble understanding it is possible to avoid duplicating (or copy/paste) code with the help of JavaScript or server side language. Check out this search for a start: html code duplicate in multiple pages - Search (

Thanks for the advice, but I’m a new guy here, just started learning HTML and CSS. JS is next :slight_smile: