CS logo


Commonly Used HTML Codes
 
Header tags
HTML Code Sample
<H1>Header 1</H1>   

Header 1

<H2>Header 2</H2>

Header 2

<H3>Header 3</H3>

Header 3

<H4>Header 4</H4>

Header 4

<H5>Header 5</H5>
Header 5
<H6>Header 6</H6>
Header 6

 

Text formatting tags
HTML Code Sample
<B>bold</B> bold
<U>underline</U> underline
<I>italic</I> italic

 

Alignment tags
HTML Code Sample
<P ALIGN=Left>your text

your text

<P ALIGN=Center>your text

your text

<P ALIGN=Right>your text

your text

 

Ordered list (numbers)
HTML Code Sample
<OL>
<LI>First row
<LI>Second row
</OL>
  1. First row
  2. Second row

 

Unordered list (bullets)
HTML Code Sample
<UL>
<LI>First row
<LI>Second row
</UL>
  • First row
  • Second row

 

Definition list
HTML Code Sample
<DL>
<DT>Term
<DD>Description
</DL>
Term
Description

 

Horizontal line tag
HTML Code Sample
<HR>
<HR SIZE=6 WIDTH=50%>

 

Break tags

HTML Code

Description
<P> Paragraph break
<BR> Forced line break

 

Indentation tag
HTML Code Sample
Here is some text. <BR>
<BLOCKQUOTE>Here is one line of indented text.<BR>
Here is another line of indented text.
</BLOCKQUOTE>
Here is some text.
Here is one line of indented text.
Here is another line of indented text.

 

External link tags
HTML Code Sample
<A HREF="filename or URL">description</A>

For example:
<A HREF="filename or URL">
CNN</A>

CNN

 

Internal link tag (anchor tag)
HTML Code Sample
<A NAME="anchor name">Section name</A>

For example:
<A NAME="anchor name">Introduction</A>

Introduction

 

Internal link tag (link tag)
HTML Code Sample
<A HREF="#anchor name">Destination</A>

For example:
<A HREF="#anchor name">
Introduction</A>

Introduction

 

Graphic tags
HTML Code Sample
<IMG SRC="balloon.gif">
(By default, the graphic is left aligned.)
hot air balloon
<IMG SRC="balloon.gif" Align=right> hot air balloon
<P ALIGN=Center>
<IMG SRC="
balloon.gif">

hot air balloon

<IMG SRC="balloon.gif" Align=right Vspace=20> hot air balloon
<IMG SRC="balloon.gif" Align=left Hspace=30> hot air balloon

Back to Creating a Web Page at Temple


2010. Temple University. All rights reserved.