HTML tags
csun.edu/science/help/help_docs/html_tags.html
HTML Tags Chart
source: www.web-source.net
Tag Name Code Example Browser View
<!-- comment <!--This can be viewed in the HTML part of a Nothing will show
document-->
<A - anchor <A HREF="http://www.yourdomain.com/">Visit Our Visit Our Site
Site</A>
<B> bold <B>Example</B> Example
<BIG> big (text) <BIG>Example</BIG> Example
<BODY> body of <BODY>The content of your page</BODY> Contents of your webpage
document
<BR> line break The contents of your page<BR>The contents of The contents of your page
your page The contents of your page
<CENTER> center <CENTER>This will center your This will center your contents
contents</CENTER>
<DD> definition <DL> Definition Term
description <DT>Definition Term Definition of the term
<DD>Definition of the term Definition Term
<DT>Definition Term Definition of the term
<DD>Definition of the term
</DL>
<DL> definition <DL> Definition Term
list <DT>Definition Term Definition of the term
<DD>Definition of the term
Definition Term
<DT>Definition Term Definition of the term
<DD>Definition of the term
</DL>
<DT> definition <DL> Definition Term
term <DT>Definition Term Definition of the term
<DD>Definition of the term
Definition Term
<DT>Definition Term
Definition of the term
<DD>Definition of the term
</DL>
<EM> emphasis This is an <EM>Example</EM> of using This is an Example of using
the emphasis tag the emphasis tag
<EMBED> embed <EMBED src="yourfile.mid" width="100%"
object height="60" align="center">
<EMBED> embed <EMBED src="yourfile.mid" autostart="true"
object hidden="false" loop="false">
<noembed><bgsound src="yourfile.mid" loop="1"> Music will begin playing when
</noembed> your page is loaded and will
only play one time. A control
panel will be displayed to
enable your visitors to stop the
music.
<FONT> font <FONT FACE="Times New Example
Roman">Example</FONT>
1/7
<FONT> font <FONT FACE="Times New Roman" Example
SIZE="4">Example</FONT>
<FONT> font <FONT FACE="Times New Roman" SIZE="+3" Example
COLOR="#FF0000">Example</FONT>
<FORM> form <FORM action="mailto:[email protected]"> Name:
Name: <INPUT name="Name" value="" size="10"> Email:
<BR>
Email: <INPUT name="Email" value="" size="10">
<BR>
<CENTER><INPUT type="submit"></CENTER>
</FORM>
<H1> heading 1 <H1>Heading 1 Example</H1> Heading 1 Example
<H2> heading 2 <H2>Heading 2 Example</H2> Heading 2 Example
<H3> heading 3 <H3>Heading 3 Example</H3> Heading 3 Example
<H4> heading 4 <H4>Heading 4 Example</H4> Heading 4 Example
<H5> heading 5 <H5>Heading 5 Example</H5> Heading 5 Example
<H6> heading 6 <H6>Heading 6 Example</H6> Heading 6 Example
<HEAD> heading of <HEAD>Contains elements describing the Nothing will show
document document</HEAD>
<HR> horizontal <HR>
rule Contents of your webpage
Contents of your webpage
<HR> horizontal <HR WIDTH="50%" SIZE="3"> Contents of your webpage
rule
Contents of your webpage
<HR> horizontal <HR WIDTH="50%" SIZE="3" NOSHADE> Contents of your webpage
rule
Contents of your webpage
<HR> horizontal <HR WIDTH="75%" COLOR="#FF0000" Contents of your webpage
(Internet rule SIZE="4">
Explorer)
Contents of your webpage
<HR> horizontal <HR WIDTH="25%" COLOR="#6699FF" Contents of your webpage
(Internet rule SIZE="6">
Explorer)
Contents of your webpage
<HTML> hypertext <HTML><HEAD><META><TITLE>Title of your Contents of your webpage
markup webpage</TITLE></HEAD><BODY>Webpage
language contents</BODY></HTML>
<I> italic <I>Example</I> Example
<IMG> image <IMG SRC="Earth.gif" WIDTH="41" HEIGHT="41"
BORDER="0" ALT="a sentence about your site">
2/7
<INPUT> input field
Example 1: Example 1:
<FORM METHOD=post ACTION="/cgi-
bin/example.cgi">
<INPUT type="text" size="10" maxlength="30">
<INPUT type="Submit" VALUE="Submit">
</FORM>
<INPUT> input field
(Internet Example 2: Example 2:
Explorer)
<FORM METHOD=post ACTION="/cgi-
bin/example.cgi">
<INPUT type="text" STYLE="color: #FFFFFF; font-
family: Verdana; font-weight: bold; font-size: 12px;
background-color: #72A4D2;" size="10"
maxlength="30">
<INPUT type="Submit" VALUE="Submit">
</FORM>
<INPUT> input field
Example 3: Example 3:
<FORM METHOD=post ACTION="/cgi-
bin/example.cgi">
<TABLE BORDER="0" CELLSPACING="0"
CELLPADDING="2"><TR><TD
BGCOLOR="#8463FF"><INPUT type="text"
size="10" MAXLENGTH="30"></TD><TD
BGCOLOR="#8463FF" VALIGN="Middle">
<INPUT type="image" name="submit"
src="yourimage.gif"></TD></TR> </TABLE>
</FORM>
<INPUT> input field
Example 4: Example 4:
<FORM METHOD=post ACTION="/cgi-
bin/example.cgi">
Enter Your Comments:<BR>
<TEXTAREA wrap="virtual" name="Comments"
rows=3 cols=20 MAXLENGTH=100>
</TEXTAREA><BR>
<INPUT type="Submit" VALUE="Submit">
<INPUT type="Reset" VALUE="Clear">
</FORM>
<INPUT> input field
Example 5: Example 5:
<FORM METHOD=post ACTION="/cgi- Select an option:
bin/example.cgi">
<CENTER>
Select an option:
<SELECT>
<OPTION >option 1
<OPTION SELECTED>option 2
<OPTION>option 3
<OPTION>option 4
<OPTION>option 5
<OPTION>option 6
</SELECT><BR>
<INPUT type="Submit" VALUE="Submit">
</CENTER>
</FORM>
3/7
<INPUT> input field
Example 6: Example 6:
<FORM METHOD=post ACTION="/cgi- Select an option:
bin/example.cgi"> Option 1
Select an option:<BR> Option 2
<INPUT type="radio" name="option"> Option 1 Option 3
<INPUT type="radio" name="option" CHECKED>
Option 2 Select an option:
<INPUT type="radio" name="option"> Option 3 Selection 1
<BR> Selection 2
<BR> Selection 3
Select an option:<BR>
<INPUT type="checkbox" name="selection">
Selection 1
<INPUT type="checkbox" name="selection"
CHECKED> Selection 2
<INPUT type="checkbox" name="selection">
Selection 3
<INPUT type="Submit" VALUE="Submit">
</FORM>
<LI> list item Example 1:
Example 1: List item 1
List item 2
<MENU> List item 3
<LI type="disc">List item 1
<LI type="circle">List item 2
<LI type="square">List item 3 Example 2:
</MENU>
i. List item 1
Example 2: ii. List item 2
iii. List item 3
<OL type="i"> iv. List item 4
<LI>List item 1
<LI>List item 2
<LI>List item 3
<LI>List item 4
</OL>
<LINK> link Visit our <A Visit our site
HREF="http://www.yourdomain.com/">site</A>
<MARQUEE> scrolling <MARQUEE bgcolor="#CCCCCC" loop="-1" E
(Internet text scrollamount="2" width="100%">Example
Explorer) Marquee</MARQUEE>
<MENU> menu <MENU> List item 1
<LI type="disc">List item 1 List item 2
<LI type="circle">List item 2 List item 3
<LI type="square">List item 3
</MENU>
<META> meta <META name="Description" content="Description Nothing will show
of your site">
<META name="keywords" content="keywords
describing your site">
<META> meta <META HTTP-EQUIV="Refresh" Nothing will show
CONTENT="4;URL=http://www.yourdomain.com/">
<META> meta <META http-equiv="Pragma" content="no-cache"> Nothing will show
<META> meta <META name="rating" content="General"> Nothing will show
<META> meta <META name="ROBOTS" content="ALL"> Nothing will show
<META> meta <META NAME="ROBOTS" Nothing will show
content="NOINDEX,FOLLOW">
4/7
<OL> ordered Example 1:
list Example 1: 1. List item 1
2. List item 2
<OL> 3. List item 3
<LI>List item 1 4. List item 4
<LI>List item 2
<LI>List item 3 Example 2:
<LI>List item 4
</OL> a. List item 1
b. List item 2
Example 2: c. List item 3
<OL type="a"> d. List item 4
<LI>List item 1
<LI>List item 2
<LI>List item 3
<LI>List item 4
</OL>
<OPTION> listbox <FORM METHOD=post ACTION="/cgi- Select an option:
option bin/example.cgi">
<CENTER>
Select an option:
<SELECT>
<OPTION>option 1
<OPTION SELECTED>option 2
<OPTION>option 3
<OPTION>option 4
<OPTION>option 5
<OPTION>option 6
</SELECT><BR>
</CENTER>
</FORM>
<P> paragraph This is an example displaying the use of the This is an example displaying
paragraph tag. <P> This will create a line break the use of the paragraph tag.
and a space between lines.
This will create a line break and
Attributes: a space between lines.
Example 1:<BR> Attributes:
<BR>
<P align="left"> Example 1:
This is an example<BR>
displaying the use<BR> This is an example
of the paragraph tag.<BR> displaying the use
<BR> of the paragraph tag.
Example 2:<BR> Example 2:
<BR>
<P align="right"> This is an example
This is an example<BR> displaying the use
displaying the use<BR> of the paragraph tag.
of the paragraph tag.<BR>
Example 3:
<BR>
Example 3:<BR>
This is an example
<BR>
<P align="center"> displaying the use
of the paragraph tag.
This is an example<BR>
displaying the use<BR>
of the paragraph tag.
<SMALL> small <SMALL>Example</SMALL> Example
(text)
<STRONG> strong <STRONG>Example</STRONG> Example
emphasis
5/7
<TABLE> table Example 1:
Example 1:
<TABLE BORDER="4" CELLPADDING="2" Column 1 Column 2
CELLSPACING="2" WIDTH="100%">
<TR>
<TD>Column 1</TD> Example 2:
<TD>Column 2</TD>
</TR>
</TABLE> Column 1 Column 2
Example 2: (Internet Explorer)
Example 3:
<TABLE BORDER="2"
BORDERCOLOR="#336699" CELLPADDING="2"
CELLSPACING="2" WIDTH="100%"> Column 1 Column 2
<TR>
Row 2 Row 2
<TD>Column 1</TD>
<TD>Column 2</TD>
</TR>
</TABLE>
Example 3:
<TABLE CELLPADDING="2" CELLSPACING="2"
WIDTH="100%">
<TR>
<TD BGCOLOR="#CCCCCC">Column 1</TD>
<TD BGCOLOR="#CCCCCC">Column 2</TD>
</TR>
<TR>
<TD>Row 2</TD>
<TD>Row 2</TD>
</TR>
</TABLE>
<TD> table data <TABLE BORDER="2" CELLPADDING="2"
CELLSPACING="2" WIDTH="100%">
<TR> Column 1 Column 2
<TD>Column 1</TD>
<TD>Column 2</TD>
</TR>
</TABLE>
<TH> table <DIV align="center"><TABLE>
header <TR> Column Column Column
<TH>Column 1</TH> 1 2 3
<TH>Column 2</TH>
<TH>Column 3</TH> Row 2 Row 2 Row 2
</TR>
<TR> Row 3 Row 3 Row 3
<TD>Row 2</TD>
<TD>Row 2</TD> Row 4 Row 4 Row 4
<TD>Row 2</TD>
</TR>
<TR>
<TD>Row 3</TD>
<TD>Row 3</TD>
<TD>Row 3</TD>
</TR>
<TR>
<TD>Row 4</TD>
<TD>Row 4</TD>
<TD>Row 4</TD>
</TR>
</TABLE>
</DIV>
<TITLE> document <TITLE>Title of your webpage</TITLE> Title of your webpage will be
title viewable in the title bar.
6/7
<TR> table row <TABLE BORDER="2" CELLPADDING="2"
CELLSPACING="2" WIDTH="100%">
Column 1 Column 2
<TR>
<TD>Column 1</TD>
<TD>Column 2</TD>
</TR>
</TABLE>
<TT> teletype <TT>Example</TT> Example
<U> underline <U>Example</U> Example
<UL> unordered Example 1:<BR>
list <BR> Example 1:
<UL>
<LI>List item 1 List item 1
<LI>List item 2 List item 2
</UL>
<BR>
Example 2:<BR> Example 2:
<UL type="disc">
List item 1
<LI>List item 1
<LI>List item 2 List item 2
<UL type="circle"> List item 3
<LI>List item 3 List item 4
<LI>List item 4
</UL>
</UL>
7/7