(Quick quiz -- what do those letters stand for? If you read the previous lesson you would know!).
<tag_name>string of text</tag_name>As an example, the title for this section uses a header tag:
<h3>What are HTML tags?</h3>This tag tells a web browser to display the text What are HTML tags? in the style of header level 3 (We'll learn more about these tags later). HTML tags may tell a web browser to bold the text, italicize it, make it into a header, or make it be a hypertext link to another web page. It is important to note that the ending tag,
</tag_name>contains the "/" slash character. This "/" slash tells a web browser to stop tagging the text. Many HTML tags are paired this way. If you forget the slash, a web browser will continue the tag for the rest of the text in your document, producing undesirable results (as an experiment you may want to try this later).
NOTE: A web browser does not care if you use upper or lower case. For example, <h3>...</h3> is no different from <H3>...</H3>Unlike computer programming, if you make a typographical error in HTML you will not get a "bomb" or "crash" the system; your web page will simply look, well... wrong. It is quick and easy to go inside the HTML and make the changes.
Your browser has a small but open vocabulary! An interesting aspect of HTML is that if the browser does not know what to do with a given tag, it will ignore it! For example, in this document you are viewing, the header tag for this section really looks like this:
<wiggle><h3>What are HTML tags?</h3></wiggle>but since your browser probably does not support a <wiggle> tag (I made it up, perhaps in the future it could cause the text to wave across the screen?), it proceeds with what it knows how to do. If I was programming a new web browser, I might decided to add the functionality for the <wiggle> tag into my software.
NOTE: This is a good place to remind you that we will provide directions that are somewhat general as the menu names and file names can differ depending on which web browser you are using.
So you will want to be pretty comfortable jumping between different applications and windows on your computer. Another option is to print out the lesson instructions (but we really do not want to promote tree carnage).
Here are the steps for setting up your workspace:
NOTE: The only reason to have two windows here is so that you can read the instructions for the lessons and also view your working document. You could also bookmark this web page and jump back here via your Go or History menu.
NOTE: You will need to move back and forth between the different windows to complete these lessons. This can be a challenge depending on the size of your monitor. You may choose to resize the three windows so that they all fit on your screen or layer your windows so you can click on any of them to bring it to the front.If you are using a word processor program to create your HTML, be sure to save in plain text (or ASCII) format.
Also, it will help you if you first create a new directory/folder on your computer that will be your work area. You can call it workarea or myspace or whatever you like; just make sure that you keep all of the files you create in this one area. It will make your life simpler... well, at least while working on this tutorial!
The basic structure then of any HTML page is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <!-- header info used to contain extra information about this document, not displayed on the page --> </head> <body> <!-- all the HTML for display --> : : : : : : </body> </html>The very first line:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">is not technically required, but is a code that tells the browser what version of HTML the current page is written for. For more information, see the W3C Reference Specification.
Enclose all HTML work within <html>...</html> tags. Inside is first your <head>...</head> and then the <body>...</body>. Your web pages may display fine on most computers without any of these tags. However by using them, your web pages will be fully compliant with International HTML standards and ensure compatibility with future web browsers.
It's good habit, like brushing your teeth.
Also note the comment tags enclosed by <!-- blah blah blah -->. The text between the tags are NOT displayed in the web page but are there to put information that might be of use to yourself or anyone else that might look at the HTML behind the web page. When your web pages get complicated (like you will see when we get into tables, frames, and other fun stuff about 20 lessons from now!), the comments will be very helpful when you need to update a page you may have created long ago.
Here are the steps for creating your first HTML file. Are you ready?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <title>Volcano Web</title> </head> <!-- written for the Writing HTML Tutorial by Lorrie Lava, February 31, 1999 --> <body> In this lesson you will use the Internet to research information on volcanoes and then write a report on your results. </body> </html>
NOTE: Look where the <title>...</title> tag is located. It is in the <head>...</head> portion and thus will not be visible on the screen. What does it do? The <title> tag is used to uniquely identify each document and is also displayed in the title bar of the browser window.In lesson 3 you will learn how to add a title that will appear directly on your web page.
Also note that we have inserted a comment tag that lists the name of the author and the date the document was created. You could write anything in between the comment tags but it is only visible when you look at the source HTML for a web page.
NOTE: For Windows 3.1 users, you must save all of your HTML files with names that end in .HTM, so in this case your file should be VOLC.HTM. Do not worry! Your web browser is smart enough to know that a file that has a name that ends in .HTM is an HTML file.By using this file name extension, a web browser will know to read these text files as HTML and properly display the web page.You can create files with names like VOLC.HTML if you use Windows95 or Windows NT.
If your document was different from the sample, review the text you entered in the text editor.
The most common mistake is, "I cannot see the title!" You shouldn't! The text within the <title>...</title> tag is NOT displayed on the web page; you should see it in the titlebar of the web browser window.
Keep this file handy as you will add to it in later lessons.
But, to be honest, it is pretty short and not very exciting! In the next lesson you will modify and update your HTML document.
The Internet Connection at MCLI is
Alan Levine --}
Comments to levine@maricopa.edu
URL: http://www.mcli.dist.maricopa.edu/tut/tut1.html