NM

Creating a website with HTML (based on HTML 4.01)

HTML can be created in a variety of ways:

  1. Notepad (for Windows look under Start-Program- Accessories). Save the file as a Text File. Name the file xxx.html or as xxx.htm if using an older windows 3.x system)
  2. SimpleText or TeachText (for Macs) or Pico or vi (for UNIX)
  3. Using a word processing package (save as a plain text file or ASCII file)
  4. In a HTML editor (Netscape Composer, Front Page, Adobe PageMill, Hot Metal, Dreamweaver)

HTML has a basic structure that uses makeup tags. Using angle brackets creates tags < >. Some tags will need an end tag </ > with a forward

Most HTML documents usually have the following source code:

<HTML> This tag makes it an HTML document
<HEAD> Labels or describes the document.
<TITLE> The title of your first HTML document </TITLE> The title will be shown in the title bar of the Web browser and in bookmarks.
</HEAD> Closes the head tag
<BODY> Here is where your content goes.

</BODY>

 

Content inside the body tags is displayed on the page that reader sees or hears.
</HTML> This tag ends the HTML document

 

1. Note that some tags are paired in that they have a starting tag <HTML> and an ending tag with a forward slash before the tag </HTML>.

2. Some tags only need a starting tag. <P> for paragraphs is an example of this.

3. Tags are nested. <HTML> <HEAD>……</HEAD> </HTML> is correct.

<HTML> <HEAD>……</HTML> </HEAD> is incorrect.

4. Some opening tags can include tag attributes (size, alignment) that provides additional information.

Viewing the document

1. Save it as a text file (xxx.html) (Remember where you saved the file).

2. Open your Web browser (example Netscape Navigator: Programs- Netscape Communicator- Netscape Navigator-File-Open Page-Choose File-Open)

3. You can switch between your HTLM doc and the Web Browser by holding down the ALT key while tapping the TAB key. Once you are back at the browser you can hit the RELOAD or REFRESH key to see any changes you have made to the HTML doc.

 

HERE ARE SOME Common TAGS

<HTML> Begins an HTML document

Not visible in the browser. (NV)

<HEAD> The head is used for the title, meta tags that help search engines, css, and many scripting languages like JavaScript. Labels page header.
<TITLE> Your Title </TITLE> Very important the title will show up on the search engines like Google and Yahoo. Try looking up movies, news, or sports and see how others have written their title. Your title should be brief yet descriptive.
<META NAME= "keywords" Content ="HTML,tags, webpage creation, tags."> Meta tags help search engines index or search the webpage.

List up to 20 keywods that would help index the page or website.

<META NAME= "description" Content = " This document provides instruction on HTML."> This metatag explains the topic or purpose or the page. This is the meta tag that is used most often.
</HEAD> closes the head tag

<BODY the obsolete BGCOLOR= "#FFFFCC"> You can now do this in CSS by placing this code in between the head tags like this:

<head>

<style type="text/css">
<!--
body {
background-color: #FFFF99;
}
-->
</style></head>

You can change the background color of the page from white to another color. This code would create a light yellow background. You can try one of the sixteen named colors.

The Sixteen Named Colors with Hexadecimal
aqua
#00FFFF


#black
# 000000
000000

blue
#0000FF
fuchsia
#FF00FF
gray
#808080
green
#008000
lime
#00FF00
maroon
#800000
navy
#000080
olive
#808000
purple
#800080
red
#FF0000
silver
#C0C0C0
teal
#008080
white
#FFFFFF
yellow
#FFFF00

Or use this color chart for other colors.

This is the first paragraph.<P>

Here is another paragraph<P>

<P align = left> Paragraph left. </P>

<P align = center> Paragraph center </P>

<P align = right> Paragraph right</P>

The <P> tag creates a paragraph by creating a full line space.

 

Paragraphs can be aligned to the left, right or center.

Name <br>
Address <br>
Phone<br>
The <br> or break tag makes a line break
<H1>

Largest

</H1>

 

<H2> Very Large Heading</H2>

 

<H6> Very small heading </H6>

Headings come in 6 sizes. Heading 1is the largest. Heading 6 is the smallest.
<B> Bold face text </B> This code is being depreciated or replaced <strong> XXX </strong> and by <em> emphasis </em> that can be used in both visual and aural devices. Css can now used for this function. Bold text
<I> Italic </I> Italic text

<BLOCKQUOTE> quotation goes here </BLOCKQUOTE>

Used for longer quotations so that the type is indented

 

<PRE> Keeps spacing already present </Pre> Preformatted Text

<FONT FACE = Ariel>Ariel </FONT> this style is being replaced by using css:

<head>

<style type="text/css">
<!--
.style5 {
color: #00FF00;
font-family: Arial;
}
-->
</style>

</head>

and then in the body:

<body>

<p class="style5">HELLO in Ariel and pastel green in css</p>

</body>

 

Ariel

Other fonts are Verdana, New Times Roman, Courier New. If the readers browser does not support a certain font it will select a default font.

HELLO in Ariel and pastel green in css

<UL> creates an unordered list

<LI> a bulleted item

<LI TYPE = circle> another item

<LI TYPE = square> yet another item

</UL>

The beginning tag to start a list
  • a bulleted item
  • another item

Bulleted items can also use squares

  • yet another item

Unordered list closing tag

<OL> Ordered list (numbered)

<LI>first item

<LI>second item

<LI TYPE = A> Uses capital letters

<LI TYPE = I> Uses Roman Numerals

<LI TYPE= a> Uses lower case letters

</OL>

Ordered lists have numbered
  1. first item
  2. second item

Ordered lists can also use other attributes

  1. uses capital letters
  2. uses capital letters

Another attributes are possible such as using
Roman numerals or lower case letters.

This tag ends the ordered list

<DIV> creates a container or division that other items can be placed into </DIV> a div can be used to apply color, use a border, apply a font, or many other applications. Here is an example:

<div style="color:#00FFFF; border: solid;">
<h4>This is a header</h4>
<p>This is an example of a div tag.</p>
</div>

This is a header

This is an example of a div tag.

 

Try changing the color

Borders can also be: dotted, dashed, double, groov, ridge, inset, outset

Green text!

or have < p style="color:red"> red text </p>
You can add color ;

You can also change the font size (+) or (-)

from the default size

<HR>

<HR Size = 3 NOSHADE>

<HR Width = "50%">

Horizontal rules separate sections on a web page

adds a horizontal rule of 3 pixels


HR goes half way across the page


<A HREF=" http://thomas.loc.gov">

Hyperlink to Library of Congress.</A>

This anchor tag creates a hyperlink to an external document.
<A HREF= "MAILTO: JQPUBLIC @

blank.com"</A>

Send comments to J Q Public Creates a mailto link
<IMG SRC= "outdoor.gif" ALT= "outdoors">

The image and the html should be saved in the same file folder.

This adds an image; provides an

alternative written description if the

users can’t view the image

<IMG SRC= "outdoor.gif" WIDTH= 200 Height= 157 align = middle> adjusts the size of the image
<CENTER> <IMG SRC="camp.gif"> This Centers the Image. You can also adjust the image to the left or the right.
<BR CLEAR =RIGHT> This adjusts the text to the next clear

spot to the next open right margin.

(left; all)

BORDER= 20 HSPACE=10 VSPACE=10 Creates a border of 20 pixels, horizontal space of 10 pixels, and vertical space of 10 pixels.
</BODY> This ends the body
</HEAD> Ends the HTML

Some references:

Wonderful resources- htmlgoodies.com ,WebReference

The Creators of HTML standards- http://www.w3.org/ , HTLM 4.01, HTML 5.0 draft

DMOZ has HTML described in different languages such as French, Spanish, Russian, Korean, Japanese and other languages.

Attributes Chart http://www.w3.org/TR/REC-html40/index/attributes.html

Interactive Tutorial- http://www.davesite.com/webstation/html/

Special Codes (Foreign letters, symbols, spaces) -http://www.ascii.cl/htmlcodes.htm

 



HOME 2007-2012 Gloria Boone