The "page" is the basic unit of the Web. Creating and publishing your
own pages on the Web is actually very simple. Pages are created using a
language called HTML. HTML is probably the easiest of all languages to
learn. Most of the vocabulary is made up of basic english words. The browser
interprets the HTML "code" into what we want to show and have happen.
The basis of HTML code is the <TAG>. A tag always starts with a < sign, and ends with a > sign. (These are called "less than" and "greater than" symbols, but in class, we will often call them open and close tag symbols.) The / symbol tells the browser to end the direction. Most tags must be closed after they are open. A way to think about it is that the first tag <TAG> turns something "on" and the second </TAG> turns something "off".
For example, to italicize text, the code would look like <I>Text to be italicized</I> where "I" means italic..
A basic page MUST have four basic sets of tags: <HTML> <HEAD>
<TITLE> and <BODY> so all HTML documents include the following basic
framework:
<HTML> <----Opens a page, i.e. turns HTML "on"!
<HEAD> <----Begins space for information to control the
top area of browser, i.e. turns HEAD "on"!
<TITLE>Document Name</TITLE> <---- Specify what to appear
on top of the page.
</HEAD> <---- Ends space for information to control the
top area of browser, i.e. turns HEAD "off"!
<BODY> <----Begins space for information to control the
main area of browser, i.e. turns HEAD "on"!
Page content goes here! <----Put what is to appear on the page in
this area.
</BODY> <---- Ends space for information to control the
main area of browser, i.e. turns HEAD "off"!
</HTML> <----Ends a page, i.e. turns HTML "off"!
Convert your HELLO file to a simple page by opening it and adding HTML, HEAD, TITLE and BODY.
When you are finished, please resave your page using "save as" with your last name and the extension ".htm" (lastname.htm)
View this new page again using your browser.
Did anything strange happen? What? Why?
Here are some very general rules of thumb about HTML on the Web
Capitalization in HTML Tags makes no difference.
Quotation Marks in HTML Tags are optional.
many things are defined, and the custom
is to enclose them in quotation marks.
It often isn't necessary.
If you don't--YOUR PAGE WILL NOT SHOW UP IN A BROWSER!
When in doubt, use quotation marks.
Closing HTML Tags to match your Opening Tags is critical.
Controlling the Behavior of Tags with Attributes
Attributes are information you add to basic tags to modify their behavior.
There are a wide variety of attributes that are commonly used to control the behavior of tags. For example, you will learn to change the characteristics of fonts with attributes such as size and color. You will also see that some of the attributes for color work in about the same way in both the BODY tag and the FONT tag. The same attributes also work in other places such as image (IMG), horizontal rule (HR) and tables (TABLE). For example, you can add a border to pictures by adding an attribute to the IMG tag. This is the point where you can often find out more information by looking up specific tags in either a book you bought or on the internet rather than memorize what is possible, or even expect a single reference to be authoritative.
See Introduction to HTML Castro pp.14-16 (alt. pp. 11-13)
See HTML Building Blocks Castro pp. 23-25 (alt. pp. 21-29)