HTML guide

HTML (hypertext markup language) is used to create files for the World Wide Web. HTML documents are plain-text that you can create using a text editor such as Notepad (go to START menu - All Programs - Accessories - Notepad).

Each document should contain these basic tags:

  • <html> - lets the browser know that the file contains HTML coded information
  • <head> - first part of the document that contains the title
  • <title> - defines the text displayed in the title bar
  • <body> - defines the content of your document. Background color can be set here. If no color is specified, the background is white.

Some tags allow you to format the content of your document:

  • Heading levels <H1>, <H2>, ... <H6> display text in larger/bolder fonts than normal body text, <H1> being the largest/boldest.
  • <P> - paragraph
  • <B> - makes the text bold
  • <I> - makes the text italic
  • <center> - centers the text
  • <marquee> text or image scrolls across the screen
  • <br> - inserts a line break (exception to the paired tag rule)

Most of the tags listed above consist of both a begin tag (<tag name>) and end tag (</tag name>).

Tags are NOT case sensitive: <html> is the same as <HTML>.

Example HTML document:

<html>
<head>
<title> Example </title>
</head>
<body bgcolor = pink>
   <H1>This is an example</H1>
   <b> This text will be bold </b> <br>
   <center> This text will be centered </center> <br>
   <marquee> This text will scroll across the screen </marquee>
</body>
</html>

See the HTML Webquest on creating web sites to learn more about HTML, such as how to insert an image or draw a horizontal line.

lmayer@elgin.edu