HTML Basics

HTML is a system for formatting web pages. It makes use of formatting codes, called "tags," which are enclosed in angle brackets. Some tags come in pairs, others are used alone. HTML 4.0, which was the standard for some time, was not case sensitive, and today's browsers will accept both upper and lower case tags. However, the new standard, XHTML, uses lower case tags and so it is a good idea to start using lower case tags. (Note that Javascript is case sensitive.)
Example:
<b> Text between these tags will appear in bold face.</b>

Some tags can be modified through the use of "attributes." XTML requires that the values for the attributes be given in quotes.
Example:
<font size="24">
Here, size is the attribute, specifying 24 point font.

HTML files are divided into two parts the "head" and the "body". You use the head and body tags to indicate these sections. The head section must contain a title tag that titles the window. The body section will contain the content of the web page.
Example:

<html>
<head>
<title>My Home Page</title>
</head>
<body>
<h1>Home Page</h1>
</body>
</html>
The h1 tag indicates a large "heading" for the page. (Note the difference between a window title and a heading. The window title appears in the title bar of the window.) Some other commonly used html tags are given below.

Open Tag
Close TagAttributeDescription
<a>
</a>href="url"creates link
<b>
</b>(none) bold face
<i>
</i>(none) italic face
<u>
</u>(none) underline face
<center>
</center>(none) center text
<hr>
(none)size= or width=horizontal line
<img>
(none)src="url"insert an image
<p>
</p>(none)paragraph break
<br>
(none)(none)line break

For more information on making web pages see: http://cs.gmu.edu/~amarchan/webpage.html

Click here to return to the IT 103 Class page
Click here to return to the IT 108 Class page


Copyright © 1999, 2000 All Rights Reserved