blob: 82ccc1c734c10ffab75515167fe21ad3148ab2cd [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../org.eclipse.platform.doc.usre/book.css" />
<title>Creating HTML and XHTML files and framesets</title>
<script language="JavaScript">
function popup_window( url, id, width, height )
{
popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + ',left=,top=' );
popup.focus();
}
</script><script language="JavaScript" src="help/liveHelp.js"></script></head>
<body id="tjcrehtm"><a name="tjcrehtm"><!-- --></a>
<h1 class="topictitle1">Creating HTML and XHTML files and framesets</h1>
<div><p>You can use the New HTML File wizard to create HTML and XHTML
files and framesets. You can also use this wizard to create compact HTML and
WML 1.3 files<div class="note"><span class="notetitle">Note: </span>You can also create a WML file by selecting <span class="menucascade"><span class="uicontrol">File</span> &gt; <span class="uicontrol">New</span> &gt; <span class="uicontrol">Other</span> &gt; <span class="uicontrol">Web</span> &gt; <span class="uicontrol">WML file</span></span></div>
To
create an HTML file using the wizard, complete the following steps:</div>
<ol><li class="skipspace"><span>Open the <span class="uicontrol">Web</span> Perspective.</span></li>
<li class="skipspace"><span>Select <span><span class="menucascade"><span class="uicontrol">File</span> &gt; <span class="uicontrol">New</span> &gt; <span class="uicontrol">HTML/XHTML File</span></span></span> to open the wizard.</span></li>
<li class="skipspace"><span>Click <span class="uicontrol">Browse</span> to select the folder in which
your want to create the file.</span> <p><b>Important</b>: Make sure you
choose a folder in or under the WebContent folder of the Web project. This
ensures that the file is available for validation, publishing, and deployment.
</p>
<p>Tip: As a shortcut, you can also start the wizard by right clicking
on your destination folder and selecting <span><span class="menucascade"><span class="uicontrol">New</span> &gt; <span class="uicontrol">HTML/XHTML File</span></span></span> from the pop-up
menu. This automatically primes the wizard with the folder information. </p>
</li>
<li class="skipspace"><span>Type a name for your new file.</span></li>
<li class="skipspace"><span>Select HTML in the <span><span class="uicontrol">Markup Language</span></span> drop-down
list.</span> Note that you can also create other file types by selecting
choices from this list.</li>
<li class="skipspace"><span>You have several options for proceeding: </span> <p> - If
you want to accept the defaults associated with a new HTML file, make sure <b>Create
from page template</b> is <u>unchecked</u>. </p>
<p> - If you want to
apply a page template to your new file, select <b>Create from page template</b> and
click <span class="uicontrol">Next</span>. A window appears in which you can select
a page template. If you want to use one of the sample templates provided,
select <span class="uicontrol">Sample page template</span> and then choose one of
the templates shown in the <span class="uicontrol">Thumbnail</span> box. If you want
to use a template of your own, select <span class="uicontrol">User-defined page template</span> and
then click <span class="uicontrol">Browse</span> to select the template from the file
system. </p>
<p> - If you do not want to use a page template, but want to
specify or customize the file options, select the <span class="uicontrol">Configure advanced
options</span> check box and click <span class="uicontrol">Next</span>. </p>
</li>
<li class="skipspace"><span>If you are configuring advanced options, select the appropriate
encoding value to add to the file's HTML declaration from the <span><span class="uicontrol">Encoding</span></span> drop-down
list. </span> The default is the value set in the <span><span class="uicontrol">HTML
Files</span></span> preferences page, which is accessed by selecting <span><span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span></span></span>,
and then expanding the <span><span class="uicontrol">Web and XML Files</span></span> preferences. </li>
<li class="skipspace"><span>Ensure that the proper content type is selected in the <span><span class="uicontrol">Content
Type</span></span> drop-down list. </span> The default is <b>text/html</b>.</li>
<li class="skipspace"><span>Select the <span class="uicontrol">Document Type</span> that you wish to
associate with the HTML or XHTML file. </span> The default for an HTML
file is <span class="uicontrol">HTML 4.01 Transitional</span>; the default for an
XHTML file is <span class="uicontrol">XHTML 1.1</span>.</li>
<li class="skipspace"><span>Specify a cascading style sheet (CSS) file to be referenced by
the new HTML or XHTML file. </span> <p>Typically, CSS files are located
in the theme folder under the Web content folder. You can use <span class="uicontrol">Add</span> to
choose a style sheet from the file system. Use <span class="uicontrol">Remove</span> to
delete a style sheet from the list, or use the arrow buttons to rearrange
the order in which the file references the style sheets. </p>
<p>If a style
sheet is already associated with the project in which you are creating the
new file, that style sheet is the default.</p>
</li>
<li class="skipspace"><span>Click <span><span class="uicontrol">Finish</span></span> to create the file
in the project that you have selected.</span> </li>
</ol>
<div>
<p><b class="reltaskshd">Related tasks</b><br />
<a href="../../org.eclipse.wst.webtoolscore.doc.user/topics/tjdetags.html">Creating and editing Web pages - overview</a><br />
</p>
</div>
<p>
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
</p>
</body>
</html>