It doesn't take too long to figure out that most HMTL pages in a web use the same lines over and over. In fact, all HTML files, when written with correct syntax, will contain the basic "skeleton" elements HTML, HEAD, BODY, and usually paragraph text.

People implementing HTML quickly saw that they could create a basic template for the skeleton of an HTML file.

They could then copy this template and modify it for every other HTML file they created--no need to keep typing that HTML skeleton.

Moreover, they could copy and modify this skeletal template to create more specialized templates: one for their home page, one for a company web, one for a list of their professional resources, and so on. Each template acts as a parent for a long line of child templates which make it more specialized. Using this type of inheritance, a web implementor can create a fairly powerful system of templates for his or or own use fairly quickly.

I might decide that my web style will require that the author include his or her email address at the bottom of each page in an ADDRESS element. I therefore copy over my minimal template file and modify it to be something like this.

This template might then serve as the "parent" for all other pages in the web; implementors would be expected to fill in the information beginning with XX-.

Using this idea, I can keep specializing my templates until they get fairly elaborate. For example, I can create a template for a "look and feel" particular to my own personal pages I provide at https://johndecember.com/john/. I create a file called "johnplate.html" which contains a fairly elaborate skeleton for a web page--including repated icons and a table to align content.

Whenever I want to create a new page of my personal information, all I have to do is copy johnplate.html to a new file and start modifying all the parts where I have left holders, beginning with XX-.

Before I do any copying and modifying though, I spend a lot of time tweaking my template, verifying it in an HTML checker and getting it just right--after all, every file which inherits its characteristics from my template will contain the same error. Similarly, I better make sure I like the color scheme in my template, as all child files of the template will also have it.

But what happens when I change my style? I don't want to have to go through all the child files again and change them--that would be extremely tedious. This need is the motivation behind the file generation technique.

See also the HTML Toolbox for software that can help you build Web pages.

search Search · star Market
2023-06-19 · John December · Terms © johndecember.com