The easiest way is to use server-side includes. Wherever you want to pull in a repeated code block, just add the line
<!--#include virtual="../block1.htm" -->
and then save the appropriate fragment file as "block1.htm". You can include as many different blocks as you want in any one page, but they do all have to be on the same domain.
You will need to either save your main files with a .shtml extension, or configure the server to treat all files as though they are .shtml.