Division of Information Technology
Web Publishing @ SFSU
Basic HTML codes & Sample HTML Document

Basic HTML codes

HTML Document
<HTML>...</HTML>
Document Header
<HEAD>...</HEAD>
Body
<BODY>...</BODY>
Title
<TITLE>...</TITLE>
Strong (bold)
<STRONG>...</STRONG>
Emphasis (italic)
<EM>...</EM>
Headings
<H1>...</H1>
Paragraph break
<P>...</P>
Line break
<BR>
Horizontal rule (plain line)
<HR>
Preformatted
<PRE>...</PRE>
Unordered list (bullets)
<UL>...
<LI> before each item...
</UL>
Ordered list (numbers)
<OL>...
<LI> before each item...
</OL>
Definition list (indents)
<DL>...
<DT>term..
<DD>definition...
</DL>
Display Image
<IMG SRC="URL" ALT="description">
Link Something
<A HREF="URL">link text</A>
Background graphic
<BODY BACKGROUND="URL">
Background color
<BODY BGCOLOR="#RRGGBB">
Text color
<BODY TEXT="#RRGGBB">
(Unvisited) Link color
<BODY LINK="#RRGGBB">
Visited Link color
<BODY VLINK="#RRGGBB">
Font color
<FONT COLOR="#RRGGBB">
Internal comment
<!--    hidden text  -->


Sample HTML document

<HTML>
<HEAD>
<TITLE>?'s Homepage</TITLE>
</HEAD>
<BODY BACKGROUND="coldfog.jpg">
<IMG SRC="mypic.gif" alt="Picture of me"><br>
<H1>Welcome</H1>
<UL>
<LI>View my <A HREF="schedule.htm">schedule</A>
<LI>Read my <A HREF="poems.htm">poems</A>
<LI>Meet my <A HREF="friends.htm">friends</A>
</UL>
<H3>Coming Soon...</H3>
<UL>
<LI>Discover my natural haircolor
<LI>View my neighbors yards
</UL>
E-mail me <A HREF="mailto:userid@sfsu.edu">comments</A>
<HR>
<I>last modified February 25, 1999</I>
</BODY>
</HTML>

About | Getting Started | Create | Publish | Enhance | Advertise | Maintain
Index | Glossary | Software | For more Information


SFSU Home   Search   Need Help?  

1600 Holloway Avenue, San Francisco, CA 94132 (415) 338-1111
Last modified February 11, 2008 by the Web Team