In dyanmic websites developed using php, asp , jsp, perl etc, including an external file like a html snippet in a file is quite easy. But at times, you may want to include a html snippet in a html file.

This can be done using Server Side Includes (SSI). SSI is a simple server side scripting language used primarily to paste contents of one or more files into another file.

For example, if you have a block of latest news on all the pages of your website. Now everytime, you need to update the news block, you would need to edit all the html pages. The easy way would be using SSI. The news block can be a html or text file like news.txt. You can include this file into multiple SSI-enabled pages throghout the website by placing the code:

<!–#include virtual-”../news.txt”–>

Now you just need to change this one file and the effect will take place throughout the website.

For more details, logon to Wikipedia.