Starting out in HTML  
your 1st webpage from scratch

 HTML or hypertext mark up language is the code underlying what you see on your computer screen when using the World Wide Web (www). Although it is possible to create wonderful pages using WYSIWYG programmes such as FrontPage or DreamWeaver knowing a little about the source code can be very helpful and increase your appreciation of the limitations and opportunities it holds for web design.
So take it easy, relax, remember your ComTech notes are online so you can work at your own pace at school or home or at your friends house so don't get tense, soon you will understand the basics of HTML and be able to do some really interesting things.

Take a look at HTML on any website by clicking on VIEW > SOURCE on your browser to see the source code which is of course HTML.
HTML tutorial (another resource)

What is HTML?

It’s not a programming language and not word processing, think of it as a way of telling the browser what to position or mark up on the screen page. One of the problems created is that each browser type and each version interprets the markup often in a different way.

Like programming however there is however syntax that must be followed and this tutorial will help you get a practical understanding of this language.
 

Brief Intro: you will soon learn that html is all about using <tags> to mark up the various components of your webpage like text images and hyperlinks

The main tags are:

Now lets get to work >
Set up your screen like this!!!!

Open NOTEPAD and EXPLORER (now you have 2 browsers open) and begin typing the following tutorial
(or cut and paste if you are lazy but remember the hand can train the brain) not the coloured type

<HTML>           - NOTE HTML STARTS AND STOPS THE MARKUP
<HEAD>
<TITLE></TITLE>  - THE HEADER CONTAINS THE TITLE WHICH SHOWS UP ON THE BROWSER NOT THE PAGE!
</HEAD>
<BODY>           - THE BODY CONTAINS THE CONTENT OF YOUR WEBPAGE 
</BODY>
</HTML>

Put something in the Title and Body areas, like so.

<HTML>
<HEAD>
<TITLE>Welcome</TITLE>
</HEAD>
<BODY>
This my first webpage!  NOTE THE DEFAULT JUSTIFICATION IS TO THE RIGHT AND FONT IS NEW TIMES ROMAN
</BODY>
</HTML>

Saving your work

Now save it as an .html file.
To do this, click file in the notepad window, then
Save As.
Where it says filename, name it
.... index.html.  (the first page of a website is always called the index.html)
Where it says save as type: make sure it says All Files(*.*).
Hit enter and it's saved.
To view your page,
open the saved html file in your EXPLORER web browser.
To see any changes you make to it, hit the
refresh/reload button at the top of your browser.

Did you notice the " / " in the closing tag this turns off the tag markup ?

 

Keep the tutorial window, your notepad, and your new webpage open = 3 WINDOWS!


is your screen set up like this (sorry to bug you!!! :'
)


To make things easier I'm only going to write what's in the <BODY> tags. I will omit the <HTML>, <HEAD> & <TITLE> tags. Needless to say, keep these in your document. When you see tags with new stuff, make these changes in your text document (notepad) SAVE and hit refresh/reload in your BROWSER. Again you should have 3 windows open.

Add any new tags in when I do. Put them in the same place/way I do.

Background Color:  

 check out this color chart

<BODY BGCOLOR="#FF0000">
Welcome
</BODY>

For more colors, go here.   check here for the hex colour code chart



 
<BODY BACKGROUND="imagename">
Welcome
</BODY>

This is to have an image as the background. Just type the image name (something like image.jpg) where it says imagename. Other kinds of images are .jpeg, .gif and .bmp. Be sure to put the full filename in. And make sure the image file is in the same folder


<BODY BGPROPERTIES=FIXED>
</BODY>

This will keep the background fixed. But this only works on explorer browsers.



 
<B>Bold</B>

Put these tags around any words to make them bold. Put the starter tag in front of the word/s you want bold, and the ending tag at the last word you want bold.


<I>Italics</I> 

Put these tags around words to make them appear in italics.


<U>Underlined</U>

Put these around words you want underlined.


<I><B>Bold Italics</B></I>

You can combine tags if you want, go ahead try it. Always make the tags nested, not overlapping.

   <THIS><THAT></THIS></THAT>    Overlapping tags.... bad
   <THIS><THAT></THAT></THIS>    Nested tags……..... good!



Font Size note there are only 7 sizes!!!!

 
 
<FONT SIZE=1>cool</FONT>

Fonts come in 7 sizes:

teeny tiny

small

regular

extra medium

large

real big &

yelling!

1

2

3

4

5

6

7


Two things I want to discuss now. First, a <TAG> tells the browser to do something. An attribute goes inside the <TAG> and tells the browser how to do it.
Second point is about defaults. As you probably know, the default value is a value that the browser assumes if you have not told it otherwise. A good example is the font size. The default font size is 3 (usually). If you say nothing it will be 3. If you make faces at your computer it will still be 3.

Every browser has a default font setting - font name, size and color. Unless you have messed with it the default is probably Times New Roman 12pt (which translates into 3 for our purposes) and it's black. Of course we can specify font names other than the defaults. Like ARIAL and COMIC SANS.

<FONT FACE="ARIAL"></FONT>
</BODY>

The font you specify will only be displayed if the viewer has it installed on their computer. If the font isn't installed, the browser reverts to the default. So, try not to put rare fonts on your page. Safe fonts:

Andale Mono       Arial       Arial Black
Comic Sans MS       Courier New       Georgia       Impact
Times New Roman       Trebuchet MS       Verdana

Now I guess is a good time to yap a bit about syntax. You notice here and there I use quotation marks, these are important. Whenever you have an attribute="value", the value should really be in quotes. It's a good habit to get into. I learned HTML as my first language just to develop good habits.


Alright, back to the fun stuff...  check out this color chart

Changing font color...

<BODY>
Changing the <FONT COLOR="#FF0000"> red font</FONT>
</BODY>
 
You can also use the words red yellow orange green blue lime 
instead of hexadecimal codes

You can use more than one attribute in a <FONT> tag...

<BODY>
More changing the <FONT COLOR="#FF0000" FACE="ARIAL" SIZE="7">font</FONT>
</BODY>
<BODY BGCOLOR="#FFFFFF">
Pick up <U><I><B><FONT COLOR="#FF0000" FACE="ARIAL" SIZE="7">milk    </FONT> </B></I></U>   
</BODY>

P>I feel the need to point out once again that multiple tags should be nested.

<TAG3><TAG2><TAG1>Hooha!</TAG1></TAG2></TAG3>

It doesn't matter which tag is first. It's not like if you want to make something red and bold you have to do one or the other first. You can do them in any order you want. Such as.............. <TAG2><TAG1><TAG3>Hooha!</TAG3></TAG1></TAG2>

The fastest way to confuse the browser, not to mention yourself is to overlap the tags...

<TAG3><TAG2><TAG1>Hooha!</TAG3></TAG1></TAG2>

(I couldn't think of a way to explain it so I hope the use of examples makes it clear.)

and now for some relaxation ahhhhhh!!!


Ok Back to work!!!!!!

Marquee

Here is an interesting kinetic addition to our collection of attribute tags........ the Marquee tag .... it will cause your text that is nested between <marquee> your text </marquee> to scroll like a "marquee' across your screen. Try it its very cool but can often be used inappropriately as are many other types of animated features in web pages.
- left is the default movement
<marquee direction="right"> moves text to the right At least this animation will not increase your file size and slow down your page download time.

This is an example of a marquee


How about headings.....

<H1>Heading 1</H1>
<H2>Heading 2</H2>
<H3>Heading 3</H3>
<H4>Heading 4</H4>
<H5>Heading 5</H5>
<H6>Heading 6</H6>

Here

 

is

  

a

 

really

 
small
 
heading
 



 
You may want to align your heading...

 

<H4 ALIGN="left">Left align your heading</H4>

<H3 ALIGN="center">Center your heading</H3>

<H2 ALIGN="right">Right align your heading</H2>

 

 Left align your heading

 

Center align your heading

 

Right align your heading

 



 
 
 
Now, to start a new line (line break tags)

 

<BODY>

<BR>Start

<BR>a

<BR>new

<BR>line

</BODY>       

If you don't do this, your browser just makes everything go in a line, like this...

Start a new line

 

To avoid this use the line break tags, OK. 

<BODY>
<BR>Can
<BR>I
<BR>
<BR>Skip
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>a line? 
</BODY>
 


 
 
Paragraph tags....
 
<P>Hey dude!<P>
 
<P>What?<P>
This makes paragraphs.  See? ayaa! dude! owhoa
 
You can align paragraphs too...

<P ALIGN="right">Paragraph1.

<P ALIGN="center">Another paragraph.

<P ALIGN="left">Yet another paragraph.

 

When using the paragraph tag, you don't need an ending tag. 




 
  
When it comes to spaces, your text editor compresses all spaces into 1 space.  So use this for heaps of spaces...

 

&nbsp;

 

Here are more special characters. Always lowercase)

     &nbsp;     non-breaking space
     &lt;       < less-than symbol
     &gt;       > greater-than symbol
     &amp;      & ampersand
     &quot;     " quotation mark
     &shy;      ­ soft hyphen



 
 
But you want to center your work, you say?  Ok then here...
 
<CENTER>I want to center my stuff</CENTER>
 


 
Lists 
<BODY>
<UL>
<LI>Milk
<LI>Bread
<LI>Butter
</UL>
</BODY>
 
·                Milk
·                 
·                Bread
·                 
·                Butter
·                 
 

Cool, huh?  You want an ordered list, you say?  Ok then, here.

<BODY>

<OL>

<LI>More milk

<LI>More bread

<LI>But no butter

</OL>

</BODY>

 

 
1.           More milk
2.            
3.           More bread
4.            
5.           But no butter
6.            
 

 

Still want more lists? How about a definition list?

 

<BODY>

<DL>

<DT>Aardvark

<DD>A burrowing, ant-eating African mammal. And, as everyone knows, the first word in every  self respecting dictionary. Did you know there's such a thing as an aardwolf?

</DL>

</BODY>

 

 
Aardvark
A burrowing, ant-eating African mammal. And, as everyone knows, the first word in every self-respecting dictionary. 
Did you know there's such a thing as an aardwolf? 



 Block quotes will move your paragraph over (like Tab)
<BODY>
<BLOCKQUOTE>
Write a whole lot of stuff in here.  
</BLOCKQUOTE>
</BODY>
Write a whole lot of stuff in here.


 
 
Ever wondered how people do this...?
- this is a cool thing to include in emails 
- open the source and work inside <PRE> </PRE> container tags
                ///\\
                (@ @)
     +----oOO----(_)-----------+
     |       Thanks again       |
     |          MIKE            |
     |         HARRIS           |
     +-----------------oOO-----+
               |__|__|  
                || ||
               ooO Ooo
 
Normally It would look like this
///\\___ (@ @) +----oOO----(_)-----------+ | Thanks again | 
| MIKE | | HARRIS| +-----------------oOO-----+ |__|__| || || ooO Ooo 
        
But here is how you stop that.
<PRE>
These are called the preformatted tab.  
What ever
you
do in between these
will stay that way.  
<PRE>
  
 
Here is the tag for pictures.
 
<P Align="center"><IMG SRC="lion2."jpg WIDTH=130 HEIGHT=80>

 

 

As you can see, in order to align the picture, you must use the paragraph tag as I have.  You also don't have to specify width and height, but it pays to.  Otherwise, just remove them from the tag. 

 

The alt tag is used when a person’s browser has picture loading disabled or they are using a text only server.

 

It is a substitute for the image. 

 

Also, put the picture you want in the same folder as your page folder.

 

 If the picture is in another folder, or another server, simply go to the picture. 

Then copy what is in the address bar into the part after
the SRC=" part of the tag.  Also, make all file names lower case
.

 




 
 
Here is a tag  rarely used. Used to show where something notable is placed like the Google search applet 
 
<!--The comment tag-->
What ever goes in here will not show up in your browser, only in your text editor.



 
 Horizontal Lines
 
 
 
Here is a tag used all the time……… horizontal line.
<HR>
You can align it.
<HR Align="center">
 check out this color chart

 
 
<HR WIDTH=100%>



 
 
<HR SIZE=1>



 
We can combine too.



 
 
Put NOSHADE in to make it solid.

 

Hyperinks 



 
 
This is the last part of the tutorial.  
  Do this:
 
<BODY>
<p>Go to<a href="http://www.michaelsharris.com/">michaelsharris</a></p>
</BODY>

 

Then add the tag

 

<BODY>

michaelsharris

</BODY>

 

The A is the anchor, the HREF (it means hyper reference) tells the browser where to go.
Simple, huh? 

 

A link for email is handy, too.

 

<BODY>

<A HREF="mailto:harris4324@rogers.com">Write me</A>

</BODY>

 

<BODY>

Write me

</BODY>

 
 
 
 

By the way, in case you were wondering URL stands for

Universal Resource Locator

A URL is just an address.

 

Well that about does it for basics.   ............time for a break......in Paris!

 

Drop down forms

Forms are used to poll readers, take votes on topics, gather information, and redirect readers to other sites.

Example 1) here is the code for this drop down menu

This one will not work because it does not redirect through a server with CGI script the next one does if you want to use it it will work

but you will have to change the script on your side for your subject material and links
this is an example of a table with a drop down menu
product:


<table>
<tr>
<td>product: </td>
<td><select name = product>
<option> Nike
<option> Addidis
<option> Sacauny
<option> Keds
</select></td>
</tr>
</td>
</table>
 

 

Example 2)  below is the code for a drop down menu such as this (cut and paste)

This one works because it is using a redirect script from another site called IDOCS (where the CGI script is resident) and allows students to use it as well!!! You have to make the custom changes to the script.

 

 

<FORM
ACTION="http://www.idocs.com/cgi-bin/redirect.pl"
METHOD=POST onSubmit="return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">Choose a Destination...

<OPTION VALUE="http://www.vangoghgallery.com/" > Van Gogh museum
<OPTION VALUE="http://www.artchive.com/artchive/C/cezanne.html" > Cezanne
<OPTION VALUE="http://www.ibiblio.org/wm/paint/auth/monet/" > Monet

</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>

 

SIMPLY CUT AND PASTE THE ABOVE CODE INTO YOUR HTML DOCUMENT AND AND CHANGE THE OPTIONS TO SUIT YOUR NEEDS FOR THE SUBJECT IE) Van Gogh and "http://www.vangoghgallery.com" etc.

 

Example 3) yet another that can be cut and pasted change the options to full URLs to suit your needs if you like

 

<form name="boogie">
<select name="surf" onChange="location=document.boogie.surf.options[document.boogie.surf.selectedIndex].value;" value="GO">
<option selected>Choose Destination</option>
<option value="book.html">Web Site Design Made Easy</option>
<option value="magic.html">Background Magic</option>
<option value="news.html">Almost a Newsletter</option>
</select>
</form>
 

 


 

Go back through this tutorial several times and then use it as a reference while you are making your own pages.

 

 

 BELOW ARE LOTS OF SEMI USEFUL HTML CODES TO USE AS REFERENCE AND TO ILLUSTRATE THAT WE HAVE JUST SKIMMED THE TIP OF AND ICEBERG

 

 

Some additional characters which you may never ever use!

 

At least you know now what html is and its importance often you can go

 

&Agrave;  À  capital A, grave accent      &iuml;    ï  small i, diæresis/umlaut   
&agrave;  à  small a, grave accent        &ETH;     Р capital Eth, Icelandic
&Aacute;  Á  capital A, acute accent      &eth;     ð  small eth, Icelandic
&aacute;  á  small a, acute accent        &Ntilde;  Ñ  capital N, tilde        
&Acirc;     capital A, circumflex        &ntilde;  ñ  small n, tilde               
&acirc;   â  small a, circumflex          &Ograve;  Ò  capital O, grave accent      
&Atilde;  à capital A, tilde             &ograve;  ò  small o, grave accent             
&atilde;  ã  small a, tilde               &Oacute;  Ó  capital O, acute accent      
&Auml;    Ä  capital A, diæresis/umlaut   &oacute;  ó  small o, acute accent        
&auml;    ä  small a, diæresis/umlaut     &Ocirc;   Ô  capital O, circumflex   
&Aring;   Å  capital A, ring              &ocirc;   ô  small o, circumflex            
&aring;   å  small a, ring                &Otilde;  Õ  capital O, tilde             
&AElig;   Æ  capital AE ligature          &otilde;  õ  small o, tilde               
&aelig;   æ  small ae ligature            &Ouml;    Ö  capital O, diæresis/umlaut 
&Ccedil;  Ç  capital C, cedilla           &ouml;    ö  small o, diæresis/umlaut   
&ccedil;  ç  small c, cedilla             &Oslash;  Ø  capital O, slash                   
&Egrave;  È  capital E, grave accent      &oslash;  ø  small o, slash          
&egrave;  è  small e, grave accent        &Ugrave;  Ù  capital U, grave accent           
&Eacute;  É  capital E, acute accent      &ugrave;  ù  small u, grave accent        
&eacute;  é  small e, acute accent        &Uacute;  Ú  capital U, acute accent      
&Ecirc;   Ê  capital E, circumflex        &uacute;  ú  small u, acute accent        
&ecirc;   ê  small e, circumflex          &Ucirc;   Û  capital U, circumflex          
&Euml;    Ë  capital E, diæresis/umlaut   &ucirc;   û  small u, circumflex            
&euml;    ë  small e, diæresis/umlaut     &Uuml;    Ü  capital U, diæresis/umlaut 
&Igrave;  Ì  capital I, grave accent      &uuml;    ü  small u, diæresis/umlaut      
&igrave;  ì  small i, grave accent        &Yacute;  Ý  capital Y, acute accent      
&Iacute;  Í  capital I, acute accent      &yacute;  ý  small y, acute accent        
&iacute;  í  small i, acute accent        &THORN;   Þ  capital Thorn, Icelandic       
&Icirc;   Π capital I, circumflex        &thorn;   þ  small thorn, Icelandic         
&icirc;   î  small i, circumflex          &szlig;   ß  small sharp s, German sz           
&Iuml;    Ï  capital I, diæresis/umlaut   &yuml;    ÿ  small y, diæresis/umlaut
 
 
 

 

Additional characters from ISO 8859-1

&#160; &nbsp;     non-breaking space          &#177; &plusmn; ± plus-or-minus sign          
&#161; &iexcl;  ¡ inverted exclamation mark   &#178; &sup2;   ² superscript two          
&#162; &cent;   ¢ cent sign                   &#179; &sup3;   ³ superscript three        
&#163; &pound;  £ pound sign                  &#180; &acute;  ´ acute accent             
&#164; &curren; ¤ general currency sign       &#181; &micro;  µ micro sign                
&#165; &yen;    ¥ yen sign                    &#182; &para;   ¶ pilcrow (paragraph sign) 
&#166; &brvbar; ¦ broken (vertical) bar       &#183; &middot; · middle dot               
&#167; &sect;   § section sign                &#184; &cedil;  ¸ cedilla                  
&#168; &uml;    ¨ umlaut/dieresis             &#185; &sup1;   ¹ superscript one          
&#169; &copy;   © copyright sign              &#186; &ordm;   º ordinal indicator, male  
&#170; &ordf;   ª ordinal indicator, fem      &#187; &raquo;  » angle quotation mark, right   
&#171; &laquo;  « angle quotation mark, left  &#188; &frac14; ¼ fraction one-quarter          
&#172; &not;    ¬ not sign                    &#189; &frac12; ½ fraction one-half             
&#173; &shy;    ­ soft hyphen                 &#190; &frac34; ¾ fraction three-quarters       
&#174; &reg;    ® registered sign             &#191; &iquest; ¿ inverted question mark        
&#175; &macr;   ¯ macron                      &#215; &times;  × multiply sign                 
&#176; &deg;    ° degree sign                 &#247; &div;    ÷ division sign                 

 

 

 

 

 
check out this color chart