Table of Contents

Before You Start...

Creating HTML Documents

A Simple HTML Document

HTML Writer: Your First Look

Exercise 1:Creating a New HTML Document

Exercise 2:Inserting Line Breaks

Exercise 3:Inserting Paragraph Breaks

Exercise 4:Inserting a Title

Formatting Your Page with Headings

Exercise 5:Inserting a Heading 1 Style

Exercise 6:Inserting a Heading 2 Style

Exercise 7: Inserting a Heading 3 Style

Exercise 8: Inserting a Heading 4 Style

Exercise 9: Inserting a Heading 5 Style

Exercise 10: Displaying Your Document In a Web Browser

Exercise 11: Creating Bold Text

Exercise 12: Creating Italic Text

Exercise 13: Creating Underlined Text

Exercise 14: Making a Horizontal Line

Exercise 15: Opening an Existing HTML Document

Exercise 16: Converting an Existing Document to HTML

Exercise 17: Creating a Target or Anchor

Exercise 18: Creating a Hypertext Local Link

Exercise 19: Inserting a Graphic

Exercise 20: Inserting a Graphic Hyperlink

Exercise 21: Inserting an Unnumbered List

Exercise 22: Inserting a Numbered List

Exercise 23: Creating Definition Lists

Nested Lists

Preformatted Text

Addresses

Appendix

How to Obtain Graphics for Your Pages

Using Windows Paintbrush to Obtain Graphics

Glossary

Notes


Before You Start...

This primer assumes that you have:


Creating HTML Documents

HTML documents are in plain (also known as ASCII) text format and can be created using any text editor. For example, you may use Edit on DOS machines, or Notepad on Windows machines.

However, the simplest and fastest way to edit HTML documents is to use a Web Page creator, such as Corel's Internet Mania, HTML Writer, or Hot Dog. You may also download "add-in" products to popular word processors such as Microsoft Word and Wordperfect. These products are called Internet Assistant and Internet Publisher, respectively. In these lessons, we will discover how to create a Web page using 's HTML Writer for Windows.


A Simple HTML Document

Normally, most new web page creators, whether commercial or shareware, will hide HTML tags by default. HTML Writer does not. You may, however, view the document without tags using Netscape.

<HTML>
<HEAD>
<TITLE>My First HTML Document</TITLE>
</HEAD>
<BODY>
<H1>This is heading style 1</H1>
<H2>This is heading 2</H2>
<H3>This is heading 3</H3>
<H4>This is heading 4</H4>
<H5>This is heading 5</H5>
This is normal text<BR>
<B>This line is in a bold style</B><BR>
<I>This line is in italics</I><BR>
<U>This line is underlined</U><BR>
</BODY>
</HTML>
 
 

HTML uses markup tags to tell the Web browser how to display the text. The above example uses:

HTML tags consist of a left angle bracket (<), (a ``less than'' symbol to mathematicians), followed by name of the tag and closed by a right angular bracket (). Tags are usually paired, e.g. <› and </H1›. The ending tag looks just like the starting tag except a slash (/) precedes the text within the brackets. In the example, <› tells the Web browser to start formatting a level-one heading; </H1› tells the browser that the heading is complete.

The primary exception to the pairing rule is the <› tag. There is no such thing as </P›.

HTML is not case sensitive. <TITLE> is equivalent to <title> or <TiTlE>. But you may want to put your HTML in upper case, to make it easier to distinguish from your page content

Not all tags are supported by all World Wide Web browsers. If a browser does not support a tag, it just ignores it.


HTML Writer: Your First Look

When you first open HTML Writer , this is what you will see:


Exercise 1: Creating a New HTML Document

It's easy to use HTML Writer to create Web pages. You can create an HTML document without even knowing HTML markup.

Now you're ready to get started. What we will do is create a new HTML document.

To create a new HTML document:

  1. From the File menu, choose New.
  2. Click HTLM | Document
  3. Click Html to insert the <HTML> </HTML> tags
  4. Insert a few carriage returns so that the tags are separated
  5. Position the cursor on the line below the opening (first) <HTML> tag
  6. Click HTLM | Document
  7. Click Head to insert the <HEAD> </HEAD> tags
  8. Insert a few carriage returns so that the tags are separated
  9. Position the cursor on the line below the opening (first) <HEAD> tag
  10. Click HTLM | Document
  11. Click Title to insert the <TITLE> </TITLE> tags
  12. Type a title for your page
  13. Click HTLM | Document
  14. Click Body to insert the <BODY> </BODY> tags
  15. Insert a few carriage returns so that the tags are separated
  16. Save your file by clicking on File|Save As.
  17. Give it a name. Make sure that the name does not include an asterisk (*), and that it is eight characters or less (This program was designed for Windows 3.1 and not Windows 95, so it does not recognize long file names)
  18. Type the following lines between the body tags:

This is heading style 1
This is heading 2
This is heading 3
This is heading 4
This is heading 5
This is normal text
This line is in a bold style
This line is in italics
This line is underlined

 


Exercise 2: Inserting Line Breaks

Yo probably noticed that the sample HTML document had extra codes at the end of each line. It was the line break, or <br> code. You may have also seen other code like this: <P>. This indicates that the section of the doculent should be treated as a separate paragraph. You may have also seen the </P> tag. It is optional. These codes would be equivalent to the [Hrt] code in Wordperfect.

To inset a line break:

  1. Position the cursor on the end of a line
  2. Click on the line break button

Exercise 3: Inserting Paragraph Breaks

Inserting paragraph breaks is similar to inserting a new paragraph in Wordperfect, except instead of typing [HRt][HRt] you use the paragraph or <P> code.

To inset a paragraph break:

  1. Position the cursor on the end of a paragraph
  2. Click on the line paragraph button

As you can see, inserting new lines and paragraphs in HTML writer is accomplished by using the <BR> and <B> codes. Although it may appear that you are inserting a line break when you press ENTER, all the text will appear on one line when you look at your document in a Web browser, such as Netscape, Mosaic, or Internet Explorer.

It is important to note that Web page authoring programs fall into two categories: those which allow you to edit codes or tags, and those which do not. Since HTML Writer lets you design Web pages by editing codes, it follows standard HTML conventions. In particular, spaces and blank lines are ignored. If you use an add-on product to a word processor such as Wordperfect or Word, it will not be necessary to insert the line and page breaks; they will be put in automatically!


Exercise 4: Inserting a Title

Once we have named it, we can give it a title. Every HTML document should have a title. A title is generally displayed separately from the document and is used primarily for document identification. In Netscape, the Document Title text tagged as <title> appears as the window title. Note that the Title tag must be contained in the <head> tag.

To insert a title in the document:

  1. Choose about half a dozen words that describe the document's purpose. Let's call it "First Attempt".
  2. Click on the Menu. Choose HTML| Document | Title .
  3. Type the title you want.

Formatting Your Page with Headings

Now that we have some text on our page, it's time to create the different styles for the paragraphs.

Exercise 5: Inserting a Heading 1 Style

To insert a heading 1 style in the document:

  1. Select the first line you typed.
  2. Click on the Heading 1, H1 button

Hint: You do not have to select the entire line. Just click anywhere on the line, and choose a style!


Exercise 6: Inserting a Heading 2 Style

To insert a heading 2 style in the document:

  1. Select the second line you typed.
  2. Click on the Heading 2, H2 button.

Exercise 7: Inserting a Heading 3 Style

To insert a heading 3 style in the document:

  1. Select the third line you typed.
  2. Click on the Heading 1, H1 button.

Exercise 8: Inserting a Heading 4 Style

To insert a heading 4 style in the document:

  1. Select the fourth line you typed.
  2. Click on the Heading 4, H4 button.

Exercise 9: Inserting a Heading 5 Style

To insert a heading 5 style in the document:

  1. Select the fifth line you typed.
  2. Click on the Heading 5, H5 button.

Exercise 10: Displaying Your Document In a Web Browser

  1. Save your file.
  2. Run Netscape or Internet Explorer by double-clicking on its icon.
  3. Select Open File... from the File menu.
  4. Use the dialog box to find and open the file you created.
  5. You should now see your file. The title you created should appear in the title bar and the HTML text you created displayed in WWW format underneath.

Exercise 11: Creating Bold Text

To make bold text:

  1. Select the line of text that you want to make bold.
  2. Press the Bold button.
  3. To remove text which is already bold, click on Edit | Undo from the menu.

Exercise 12: Creating Italic Text

To make italic text:

  1. Select the text that you want to make italic.
  2. Press the Italic button.
  3. To remove text which is already italic, click on Edit | Undo from the menu.

Exercise 13: Creating Underlined Text

To make underlined text:

  1. Select the text that you want to make underlined.
  2. Press the Underlined button.
  3. To remove text which is already underlined, click on Edit | Undo from the menu.

Exercise 14: Making a Horizontal Line

Adding a ruled line in your document is easy!. To add a horizontal rule:

  1. Choose a location on your page.
  2. Then, click on the Line button.
  3. This inserts a horizontal rule or line into your document at the insertion point. The HTML equivalent is the <hr> tag.

Exercise 15: Opening an Existing HTML Document

To open an Existing HTML document:

  1. From the File menu, choose Open.
  2. Specify the path to the HTML document.
  3. Select the file, and then choose OK.

 


Exercise 16: Converting an Existing Document to HTML

We have seen how easy it is to create new Web documents using HTML Writer. But it is also very useful, and time-saving, to take an existing document and convert it to HTML. For example, you may have a project or essay that you want the world to see. Most word processors, such as Word or Wordperfect, can export the document in ASCII or text format. This may be the fastest and simplest way to get publishing your Web page. The thing to remember is that the file must be first converted to text if it isn't already.

  1. From the File menu, choose Open.
  2. Specify the path to the document you want to open, select the file, and then choose OK.
  3. From the List of File Types drop-down box, select text, or *.txt
  4. Choose OK.

Exercise 17: Creating a Target or Anchor

A Target or anchor is the destination of hyperlinks. An anchor can be a single "point" in your document, or you can associate the anchor with a string of text.

To create an anchor that is a single point in your document:

  1. Position the insertion point where you want to locate the anchor.
  2. Click on the target button.
  3. Type the name of your anchor in the Target Name box, and then choose OK.

To create an anchor associated with a string of text:

  1. Select the text you want to associate with the anchor.
  2. Click on the target button.
  3. Type the name of your anchor in the Bookmark Name box, and then choose OK.

Now the location where you created your anchor can serve as the destination for hyperlinks.


Exercise 18: Creating a Hypertext Local Link

You use the Hypertext Local Link button to create hyperlinks to a relative link or to an anchor or target.

Before you begin this procedure, save the file in which you are creating the hyperlink.

To create a hyperlink to a relative link:

  1. Click on the Hypertext Local Link button.
  2. Select the target name from the drop-down list.
  3. Click OK.

To create a hyperlink to a URL:

  1. Click on the Hypertext Remote button.
  2. Type in the URL, or build it by clicking on the Build button.

Graphics

Exercise 19: Inserting a Graphic

You can insert an inline graphic into your HTML document either for illustrative purposes or as the starting point for a hyperlink.

To insert a graphic as an illustration:

  1. Click the Picture button.
  2. Specify the path to the graphic you want to insert by clicking on the URL drop-down box, and then select the file. The graphic must be either *.GIF or *.JPG format to be displayed by many Web browsers. In this case, use the file supplied: picture1.gif
  3. Type text describing the graphic in the "Alternative text to use if image cannot be displayed" box, and then choose OK.


Exercise 20: Inserting a Graphic Hyperlink

  1. From the Insert menu, choose HyperLink.
  2. Select the tab that describes the type of hyperlink you want to create, and then choose the Image button.
  3. Specify the path to the graphic you want to insert, and then select the file. If you want to insert a graphic from a Web server, see Inserting a Picture from a Web Server. The graphic must be either *.GIF or *.JPG format to be displayed by many Web browsers.
  4. Type text describing the graphic in the "Alternative text to use if image cannot be displayed" box, and then choose OK. If you want the "hot spot" for this hyperlink to consist of text as well as the graphic you just selected, type the text in the "Text to display" box.
  5. Finish defining your hyperlink by selecting a local document, typing a URL, or selecting a bookmark.

Lists

HTML supports unnumbered, numbered, and definition lists.

Exercise 21: Inserting an Unnumbered List

To make an unnumbered list:

  1. Type a list of two or three items (e.g Ontario, Québec, Manitoba), making sure to press the Enter key after each one.
  2. Select all the lines which you want to have as an unnumbered list.
  3. push the unnumbered list button.

This is what you will see:


Exercise 22: Inserting a Numbered List

A numbered list is identical to an unnumbered list, except it uses numbers instead of bullets

To make a numbered list:

  1. Type a list of two or three items (e.g apples, bananas, oranges), making sure to press the Enter key after each one.
  2. Select all the lines which you want to have as an numbered list.
  3. push the unnumbered list button.

This is what you will see:

  1. apples
  2. bananas
  3. oranges

Exercise 23: Creating Definition Lists

A definition list usually consists of alternating a term and a definition. Web browsers generally format the definition on a new line.

To make a definition list:

  1. Type a list of two or three definitions, making sure to press the Enter key after each one.
  2. Select all the lines which you want to have as a definition item.
  3. Select Definition List from the style drop down list box.

The following is an example of a definition list:

Bookmark
Also called Anchor. A place in your document where you want the user or reader to "arrive"; a destination.
Hyperlink
Also called Link. It is the starting or "jumping off" point to a destination, or Bookmark.

Nested Lists

Lists can be arbitrarily nested, although in practice you probably should limit the nesting to three levels. You can also have a number of paragraphs, each containing a nested list, in a single list item.

An example nested list:


Preformatted Text

Use the Preformatted style to to generate text in a fixed-width font and cause spaces, new lines, and tabs to be significant. (That is, multiple spaces are displayed as multiple spaces, and lines break in the same locations as in the source HTML file.) This is useful for program listings.

For example, this is preformatted text:

      #!/bin/csh                           
      cd $SCR                             
      cfs get mysrc.f:mycfsdir/mysrc.f   
      cfs get myinfile:mycfsdir/myinfile   
      fc -02 -o mya.out mysrc.f           
      mya.out                              
      cfs save myoutfile:mycfsdir/myoutfile 
      rm *

To make the section preformatted, select the text you want to display preformmattd. Then Click pn the PRE button.

 


Addresses

The <› tag is generally used to specify the author of a document and a means of contacting the author (e.g., an email address). This is usually the last item in a file.

For example:

Creating Web Pages Using HTML Writer dossettd@yahoo.com

 


Appendix


How to Obtain Graphics for Your Pages

WWW pages support only JPEG and GIF type grahics. Windows BMP and PCX, as well as TIFF formats are not supported. There are several ways to obtain graphics for your pages:

  1. Visit a WWW site which contains GIFs for Web pages, and download your choice.
  2. Purchase software and/or GIF files.
  3. Using Netscape, click on a picture with the right mouse button to save the picture you have chosen to disk.
  4. Obtain shareware such as Paint Shop to import and export in the different file formats.

Most of the time, it will be more convenient to use BMP graphic formats, because you will be using Windows. To create a graphic, you would likely have to convert it to GIF format.

Using Windows Paintbrush to Obtain Graphics

  1. Open Paintbrush. You will find it in the Accessories group.
  2. Minimize Paintbrush, and switch to the Program Manager.
  3. Run the program, or open the window which contains the graphics which you want to capture. In this example, the calculator icon will be captured.
  4. Press the PRINTSCREEN key on the keyboard.
  5. Switch to Paintbrush.
  6. Click on View | Zoom Out.
  7. Click on Edit | Paste.
  8. Select the text tool in order to make the hatched lines disappear. The screen which you captured should appear.
  9. Click on View | Zoom In.
  10. Use the square select tool to select the area of the picture you want to crop.
  11. Select Edit | Copy To... to copy the cropped portion of the image to a file. Give it a name. You can only save it as a BITMAP (BMP) or PAINTBRUSH (PCX) file.
  12. If you need to convert the file to JPEG or GIF for the Internet, open the file in a graphics conversion software package, and then save it or convert it.

Click on View | Zoom Out. Then click on Edit | Paste.

Click on View | Zoom In.

Use the square select tool to select the area of the picture you want to crop.

Select Edit | Copy To... to copy the cropped portion of the image to a file. Give it a name. You can only save it as a BITMAP (BMP) or PAINTBRUSH (PCX) file.


Glossary

Bookmark
Also called Anchor. A place in your document where you want the user or reader to "arrive"; a destination.
Hyperlink
Also called Link. It is the starting or "jumping off" point to a destination, or Bookmark.
HTML
HyperText Markup Language --. HTML is a collection of styles (indicated by markup tags) that define the various components of a World Wide Web document. HTML was invented by Tim Berners-Lee. He is now director of the W3 Consortium.
URL
This is the address of a World Wide Web site. URL stands for Universal Resource Locator.
 
WWW
Also called W3 or the Web. World Wide Web .

Notes:

________________________________________________________________

________________________________________________________________

________________________________________________________________

________________________________________________________________

________________________________________________________________

________________________________________________________________

________________________________________________________________