html is an acronym for HyperText Markup Language. The html code is used to tell the web browser what to do with text and how to assemble image, sound, and text by bringing together different files and telling the browser how to place everything on the "page".

Use the "Less Than" symbol < to begin an html code and the "Greater Than" symbol > to close the html code such as <html> .

The slash / is used to "turn off" commands such as </html>.

All WWW pages begin by turning on the html command which notifies the internet that html code will follow, and a body command which tells the browser that the main body of the page will follow. When the page is completed these commands are turned off (in reverse order) with the slash:

<html>
<body>

</body>
</html>

This turning on and using the slash on the same command to turn off the command is a basic principle of html code.

After announcing the html code, the "head" usually follows which usually includes the title. The title appears in the Tool Bar Area at the top of the web-page. It is not a headline on the page. Thus a simple html page might read as follows:


<html>
<head>
<title> The Title Of This Page </title>
</head>
<body>

This is the text for this page. It could go on and on and be divided into paragraphs. Notice that the letter "P" enclosed in the less-than and greater-than symbols is the html code for paragraphs. It literally tells the browser to break the line by two vertical spaces. <P>

This would be a new paragraph. By the way, Browsers are not case sensitive with regard to html Code. That means html commands can be upper case or lower case: <p> <P>

</html>
</body>


Below is the mark-up code (html) for the sample web page on the website. Notice that the body code can contain information about the background color and the color of texts. In addition, links can be made to other pages, or the browser can be asked to call image files in a particular place or to embed sound files which play automatically when the website is called up by the browser.

As you look at the what is text and what is code, you can see the principle of using the slash (/) to turn off a command. Not all commands need be paired (on and off). For example, <:hr> is the code to insert a "horizontal rule." It doesn't need to be turned off. The same is true of a line break: <BR> and the paragraph command <P> .

Handling color

We can have greater control of text and back ground by generating color with the RGB color code: "#000000". In our earlier use of color, we simply typed in the name of the color and a default color is used. Using the RGB color code gives us absolute control over all shades and hues of colors. For each column we can type a range of numbers from lowest to highest: 0 1 2 3 4 5 6 7 8 9 A B C D E F. The first two columns in the code control red, the second two columns control green and the third two columns control blue:

red green blue
"#00 0000"
The mixing of colors follows the principle similar to stage lighting. With all the lights off (everything at 0) "#000000" the result is black. With all the lights up full at equal intensity (everything at F) "#ffffff" the result is white. Of course html code doesn't care whether the letters are caps or lowercase.

We can observe how this works with the body code. The code below adds background color and information about text color to the body code (Vlink is the color of the link after it has been clicked on):

<body bgcolor="#000000" text="#ffffff" link="#ff8060" vlink="#ff8060">

For the above, the background color is black, the text color is white, and both links are the same color.

A QUICK REFERENCE TO SOME USEFUL html CODE

Links to Web Pages

To make links from your page to other pages, you are "anchoring" the text or picture to an URL (web address). The context is to turn on the anchor <a> and to turn off the anchor </a>

If you are linking to a page, you need to include the page by using HREF in which "H" stands for hypertext and "REF" stands for reference. If you are linking to a page in the same directory, then you need only to refer to that page's file name. For example:

<a href = "filename.html"> This Text is Being Anchored to the URL </a>

If the link is to a page outside of the directory, you should include the full URL or WWW address:

<a href = "http://www. domain.name/directory/filename.html"> This Text is Being Anchored to the URL </a>

Note that the hypertext reference is always enclosed in quotes.

Making your links open in new pages (TARGET ATTRIBUTE):

<a href = "http://www. domain.name/directory/filename.html" target="_blank"> Text Anchored to URL that will open as a new page </a>

Putting Images on Your Webpages

The html context for images is as follows:

<img src = "image.gif">

Notice that the filename for the image is in quotes. "IMG" tells the browser to find an image and "SRC" (source) tells the browser where the file is located and the name of the image file. The above context indicates that the image file is in the same directory as the text file. In you create a directory where you store all of your images, you would indicate that by referring to the directory:

<img src = "images/image.gif">

If you want to wrap text around the image, use the align code and align the image to the right or left of the page:

<img align = "left" src = "images/image.gif">

or
<img align = "right" src = "images/image.gif">

To center images use the "center" code by turning centering on and off:

<center>
<img src = "images/image.gif">
</center>

Putting Sound on Your Webpages

You can embed a sound file with the following command. The purpose of embedding a file is make the the file start playing automatically when the page is loaded:

<embed src="audio/filename.aiff" width="0" height="0" autostart="true" repeat="false">

A full embed command would be:

<embed src="audio/filename.mp3" width="400" height="40" autostart="false" loop="false">

Another technique is have a button, image or text that when selected by clicking will download the sound file to be played:

<a href = "audio/filename.html"> <img align = left src = "images/mozart.gif"> Click This Button to play the theme from Mozart's first symphony </A>

Example:

Click This Button to play the theme from Mozart's first symphony. Mozart composed his first symphony when he was nine years old. Classicism was just emerging and Mozart had been exposed to many works of the Stürm und Drang. Here is the opening passage in which the triad of the tonic (E-flat Major) is outlined. Notice how the theme has two distinct textures. This contrast of textures within a theme became a characteristic of Mozart themes.


The Font Command

Web Browsers use a limited number of fonts, and most authoring programs group them in families of fonts so that most computers will have at least one of the fonts indicated in the "font face" command. Here is the list of font faces that appear in many web authoring programs:

Arial, Helvitica, sans-serif

Times New Roman, Times, serif

Courier New, Courier, mono

Georgia, Times New Roman, Times, serif

Verdana, Arial, Helvetica, sans-serif

Geneva, Arial, Helvetica, sans-serif

More and more computers are carrying more font faces, so that you can experiment with additional fonts, but list them in "families" so that the computer will use your alternatives rather than the Browser's defaults.

"Font" is the element and the element can have these attributes: "face, size, color."

For example:

<font face = "arial, helvitica, sans-serif" size= "4" color = "#990000"> Don't forget to turn off the font command at the end. </font> which looks like:

Don't forget to turn off the font command at the end.


Below is the html code for the sample index page used in the section in which you are asked to activate your website.
<html>
<head>
<title> John Gilbert's Website </title>
</head>

<body bgcolor="#ffffff" text="#000000" link="#ff8060" vlink="#ff8060">

<font color = blue> <h1> Welcome to the Website of John Gilbert </h1> <P>

</font color>

<embed src="audio/enter.aiff" width="0" height="0" autostart="true" repeat="false">

<img align = left src= "images/gilbert.gif">

<font size =+1> <font color = green>
Welcome to my new website. As you know websites are always under construction, so I am not going to bother you with that "under construction" icon. Webpages by their nature get changed regularly. I am working on this page as part of an assignment. I have an assignment for a term project which I will document on this website. <p>

This course deals with MIDI recording and other music technologies which could be helpful to musicians and music educators. I am learning to do web publishing as a way of documenting my term project and ultimately displaying it in some way. <p>

As a beginning, I have done a mini-project in digital audio that I call
<a href = "analog/analog.html"> "Analog!" </a> <p>

My project involves making an orchestration of a folk song that might be suitable for a junior high school orchestra. Please visit my <a href = "project.html"> music education orchestration project</a>

<hr>

<address align=right> Comments to <font color="#ffffff"> <a href="mailto:jg12@is2.nyu.edu"> john.gilbert@nyu.edu </a> </font>

Go to <a href="http://www.nyu.edu/"> NYU Web </a> home page <BR>
Last modified 11/18/2005</address>

</body>

</html>


html Code for Accents and Special Characters
Note: These are known as "escape sequences". These escape sequences must be entered in lowercase.

Many times we find that there are special characters (such as accents and other entities that modify letters) we wish to use on a page. html provides support for these characters. Generally the principle is to begin the code for accents with an ampersand (&) and at the end of the entry use the semi-colon (;) to indicate the end of the code so that the context is: &n; (where "n" is the accent name or abbreviation)

Accented Characters

&AElig; for uppercase AE diphthong (ligature): Æ

&Aacute; for uppercase, acute accent: Á

&Acirc; for uppercase A, circ@ex accent: Â

&Agrave; for uppercase A, grave accent: À

&Aring; for uppercase A, ring: Å

&Atilde; for uppercase A, tilde: Ã

&Auml; for uppercase A, dieresis or umlaut mark: Ä

&Ccedil; for uppercase C, cedilla: Ç

&ETH; for uppercase Eth, Icelandic:Ð

&Eacute; for uppercase E, acute accent: É

&Ecirc; for uppercase E, circumflex accent: Ê

&Egrave; for uppercase E, grave accent: È

&Euml; for uppercase E, dieresis or umlaut mark: Ë

&Iacute; for uppercase I, acute accent: Í

&Icirc; for uppercase I, circumflex accent: Î

&Igrave; for uppercase I, grave accent: Ì

&Iuml; for uppercase I, dieresis or umlaut mark: Ï

&Ntilde; for uppercase N, tilde: Ñ

&Oacute; for uppercase 0, acute accent:Ó

&Ocirc; for uppercase 0, circumflex accent: Ô

&Ograve; for uppercase 0, grave accent: Ò

&Oslash; for uppercase 0, slash: Ø

&Otilde; for uppercase 0, tilde: Õ

&Ouml; for uppercase 0, dieresis or umlaut mark: Ö

&THORN; for uppercase THORN, Icelandic: Þ

&Uacute; for uppercase U, acute accent: Ú

&Ucirc; for uppercase U, circun-ttlex accent: Û

&Ugrave; for uppercase U, grave accent: Ù

&Uuml; for uppercase U, dieresis or umlaut mark: Ü

&Yacute; for uppercase Y, acute accent: Ý

&aacute; for lowercase a, acute accent: á

&acirc; for lowercase a, circumflex accent: â

&aelig; for lowercase ae diphthong (ligature): æ

&agrave; for lowercase a, grave accent: à

&aring; for lowercase a, ring: å

&atilde; for lowercase a, tilde: ã

&auml; for lowercase a, dieresis or umlaut mark: ä

&ccedil; for lowercase c, cedilla: ç

&eacute; for lowercase e, acute accent: é

&ecirc; for lowercase e, circumflex accent: ê

&egrave; for lowercase e, grave accent: è

&eth; for lowercase eth, Icelandic: ð

&euml; for lowercase e, dieresis or umlaut mark: ë

&iacute; for lowercase i, acute accent: í

&icirc; for lowercase i, circumflex accent: î

&igrave; for lowercase i, grave accent: ì

&iuml; for lowercase i, dieresis or umlaut mark: ï

&ntilde; for lowercase n, tilde: ñ

&oacute; for lowercase o, acute accent: ó

&ocirc; for lowercase o, circumflex accent: ô

&ograve; for lowercase o, grave accent: ò

&oslash; for lowercase o, slash: ø

&otilde; for lowercase o, tilde: õ

&ouml; for lowercase o, dieresis or umlaut mark: ö

&szlig; for lowercase sharp s, German (sz ligature): ß

&thorn; for lowercase thorn, Icelandic: þ

&uacute; for lowercase u, acute accent: ú

&ucirc; for lowercase u, circumflex accent: û

&ugrave; for lowercase u, grave accent: ù

&uuml; for lowercase u, dieresis or umlaut mark: ü

&yacute; for lowercase y, acute accent: ý

&yuml; for lowercase y, dieresis or umlaut mark: ÿ

Reserved html Characters

&lt; for < character

&gt; for > character

&amp; for & character

&quot; for " character

&reg; Netscape 1.0 extension, for registered trademark symbol ®

&copy; Netscape 1.0 extension, for copyright symbol ©


Below are two excellent primers on html Code:

Web HTML Tutorial

HTML GOODIES