Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Usability

Web Design Reference Guide

Hosted by


Last updated Oct 17, 2003.

SSI (Server Side Includes) are directives contained within an HTML page that dynamically generate content to the page. Using SSI to serve multiple files into a page makes a Web site easier to maintain. For instance, create three files with each representing the header, footer, and navigation. Any page needing the contents of these files can retrieve it using an includes line.

To insert an SSI line into your document, use the following syntax:

<!--#element attribute=value -->

In the following example, we're telling the page to include the contents of the file called file.shtml in this specific spot.

<!--#include virtual="file.html" -->

SSI pages often use the .shtml file extension because servers recognize it as a file with SSI instructions.

If the navigation changes, it doesn't require fixing every HTML page. Instead, make the change in the includes file and that's it. When looking at the source for the completed file, the line is not visible as it's been replaced by the contents of the file.

SSI is simple to learn and can be a good starting point for those wanting to learn server-side scripting. The disadvantage is that the page takes longer to load and it requires using the CGI-bin server.

There aren't specific books and articles on SSI. Rather, SSI is often a chapter or a paragraph in such resources. To find out more about it, do a search in your favorite search engine for "server side includes." You can also do a search for "ssi" at InformIT to get a list of books that address it.