This is often done by means of a Server-side Include (SSI), which is a snippet of code added to each page to import code from an external file. This enables updating an element in multiple pages by editing a single included file.
Not all web servers allow SSI, so you'd need to check this with your hosting company and/or try a test.
Note that this will not work on your home computer unless you are running suitable web server software on it.
Add a test page named test.html to the web root of your server, where your index/home page is. Add the following code to the file and save:
<!--#include virtual="/includes/nav.html" -->
In the same directory, create a directory named "includes". This will hold your SSI files.
Create a new file named "nav.html" and add your menu code to it, no need for head or body elements, and put it in the includes directory.
So you'll have, alongside any other files in your web root ( / = web root ):
If you then visit the URL for the test page in your browser you should see the menu.
If you see an error message it may mean that the server either does not allow SSI or needs to be configured to do so.