Using templates for uniformity and speed

A Web site will be easier to understand and navigate if it has a uniform layout and appearance. A Web designer typically determines the page layout, font faces and sizes, navigation scheme, etc. and spells these out in a style guide.

Templates may be used to enforce compliance with the style guide and to save time. Let's use two simple templates for our class Web site. We will use templates to create index.htm files for the site and for the assignments subdirectory.

The first is the home page template. It is a nearly complete definition of our home page -- the user need only enter his or her name and e-mail address in two spots along with a link to a self-portrait image. This will create the index.htm file for the Web site.

We can use a second template for our assignment home pages. To add a new assignment, one simply copies the commented <tr> definition at the end of the template and enters the assignment number, description and link if there is one. This will create the index.htm file for the assignments subdirectory.

For a large, complex site, we could use a content management system which stores the templates and content in a database.


Disclaimer: The views and opinions expressed on unofficial pages of California State University, Dominguez Hills faculty, staff or students are strictly those of the page authors. The content of these pages has not been reviewed or approved by California State University, Dominguez Hills.