As I’ve learned from designing many websites, making separate files for header and footer if you have more than one page makes you write less code and saves your time. Follow below simple steps:
https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js
The "script" tag should put inside the "head" tag. Example of "script" tag:
Note: This common header and footer will not work on local machines. In order for it to work, we need to upload it on GitHub or any similar platform.
These simple steps will save you tons of time. Happy Coding!!!!!!!