Download CREATING A TEMPLATE DOCTYPE html PUBLIC "

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
CREATING A TEMPLATE
A template can be a useful tool for any web designer. A template provides a frame that
the designer can work from, much like the frame in a house. A template contains all the
tags that will be included on every page of the web site saving the designer time in
having to type all these tags each time she wants to create a new page. For purposes
of this class, and your writing practices, it will benefit you to create a template of the
basic XHTML tags which will be included on every writing practice.
Below are the XHTML tags that every web page you create will contain and instructions
on how to create a template.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=’http://www.w3.org/1999/xhtml’ xml:lang=’en’>
<head>
<title> </title>
</head>
<body>
</body>
</html>
These tags represent the basic structure to a web page. The purpose of these tags is
explained in the lesson explanations. To create a template follow the instructions
below:
1.
2.
3.
4.
5.
6.
Copy all the tags or elements above from the <!DOCTYPE… to the </html>
tag.
Open your text editor (i.e. Notepad, WordPad, TextEdit) and paste the tags
into a blank document. Note: do not use Microsoft Word.
Save this file as “template.htm”
Be sure to save the file with the .htm extension (not .txt), this is what signifies
the file as a web page. Also, be sure to save the file in plain text format (not
rich text format or something else).
Recall where you saved the file so you can access it later.
You now have a web page template you will be able to use for your writing
practices and other web pages you create.
Using Your Template
1.
Open the “template.htm” file in wordpad or notepad (not Microsoft Word).
2.
3.
4.
5.
6.
7.
8.
With the “template.htm’ file open, select “Save As…” from the file menu.
Name the file you are saving whatever the name of the web page you are
creating should be (i.e. wp1.htm, index.htm, etc.).
This will save a copy of your template and you will still have the original
“template.htm” file that you can use again and again.
You can now begin adding the additional tags to this file you just created.
Type in the title of the page between <title> </title>.
In between the <body> and </body> tags include all the content for this
particular page.
Save again and now you will still have the template and the web page you
created using the template.
The next time you want to create a new page follow the steps above under “Using Your
Template”
CAUTION: Remember to open your “template.htm” file and choose “Save As…”
otherwise you will write over the “template.htm” file and have to start all over again.
The template you just created is very basic. When it comes time to begin working on
your personal web site or web sites you develop in the future, you might create a more
elaborate template that also includes the navigational structure, signature block, header,
and footer. In other words, a template should contain all the elements that are common
to every page. This saves time in having to retype these each time you want to create a
new page. But this must only be done after careful proofreading.