Writing@CSU

Writing Guides

Writing for the Web

 

Creating a Simple HTML Document

An HTML document consists of two main elements: the head and the body. The head element contains information about the document, such as its title, and can contain links to other documents (such as style sheets) as well as scripts that run on the page. The body element contains information that is displayed in a Web browser, such as Netscape Navigator or Microsoft Internet Explorer.

Here's an example of a simple HTML document:

<HTML>
<HEAD>
  <TITLE>Erin's Home Page</TITLE>
</HEAD>

<BODY>
<H1>Erin's Home Page</H1>
<P>Welcome to my Home Page. Some of my favorite things include mountain biking, new music, and microbrews.</P>

<P>Please send me email at <A HREF="mailto:erinb@notreal.edu">Erinb@Notreal.edu.</A></P>

</BODY>
</HTML>

Here's what the example means:

<HTML>
This tag tells the browser that it is reading an HTML document.
<HEAD>
The head tag tells the browser that this is the beginning of the Head element.
<TITLE>Erin's Home Page</TITLE>
The Title tag tells the browser that the following text is the title of the document. The title is displayed in the Title Bar of the Browser.
</HEAD>
This tag tells the browser that this is the end of the Head element.
<BODY>
This tag tells the browser that the Body element is beginning.
<H1>Erin's Home Page</H1>
The H1 tag tells the browser that this is a first-level heading. Typically, level-one headings are the largest headings in a document.
<P>Welcome to my Home Page. Some of my favorite things include mountain biking, new music, and microbrews.</P>
This text is surrounded by Paragraph tags.
<P>Please send me email at <A HREF= "mailto:erinb@notreal.edu"> Erinb@Notreal.edu.</A></P>
This paragraph contains an anchor tag that tells the browser to create an email message that will be sent to the specified address (in this case, erinb@notreal.edu).
</BODY>
This tag tells the browser that the Body element is ending.
</HTML>
This tag tells the browser that it has reached the end of the HTML document.

And here's what the example would look like:

Erin's Home Page


Welcome to my Home Page. Some of my favorite things include mountain biking, new music, and microbrews.

Please send me email at Erinb@Notreal.edu.





See Also
Links Page: Learn more about HTML on the HTML links page.

Coding Primer: You can read more about formatting text in, Formatting and Laying Out Text.

Copyright © 1993-2009 Colorado State University and/or this site's authors, developers, and contributors. Some material displayed on this site is used with permission.