Creating a new document - templates

In the HTML menu there are two functions New Document... and New with Content.... They have the same functionality with the only difference that the second one creates a new HTML document with the content of the current window. To create a new document with a FRAMESET element use New Doc. with Frames in the Frames menu.

New doc

You are first asked to choose a template for the new document, and to give the new document a name. How do you choose a template?

A new window is now opened and the template is inserted. Then a second dialog box is then opened where you can:

New document

Alpha now inserts the elements HTML, HEAD, TITLE, BODY, and the ones you have checked in the dialog box into the document asking you about attributes for them. If these elements already appear in the template, their attributes are used as default values.

Where does the content go when using New with Content? In this case Alpha looks for the string #CONTENT# in the template. If there is such a string it is replaced by the content. If there is no such string the content is put right before the closing BODY tag.

A template example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Default title</TITLE>
<LINK HREF="mystyle.css" REL="stylesheet">





In this example "Default title" which be used a the default for the window's title in the above dialog box. "Bg.jpg" will be used as the default value for the background attribute.

Tip! Put template stops () in your templates. Alpha will automatically jump to the first one.

Previous page Next page