You are on page 1of 7

Gaurav Paliwal : www.gauravtech.

in (Web Technology) HTML Tag Quick Reference Guide Note: In older versions of HTML, some tags did not require ending tags. With the emergence of XML and XHTML, you should be sure to include both beginning and ending tags. Structure Tags Function Start Tag Attributes none none none Your comments go between the start and end tags. Put a space between the -- and your comments. End Tag </html> </head> </title> -->

HTML File <html> File Header <head> File Title Comments <title> <!--

Body

<body> background="filename" bgcolor="color value" text="color value" link="color value" vlink="color value" <div> align="right/left/center" style="property:value;" class="classname" style="property:value;" class="classname"

</body>

Division

</div>

Span (inline)

<span>

</span>

Basic Text Tags Function Line Break Paragraph Start Tag <br> <p> Attributes clear="left/right/all" align="center/right" End Tag </br> or <br /> </p>

Gaurav Paliwal : www.gauravtech.in (Web Technology)

Gaurav Paliwal : www.gauravtech.in (Web Technology) Bold Italic Typewriter Text Headline Font <b> <i> <tt> <h1-6> <font> none none none align="center/right" </b> </i> </tt> </h1-6>

face="name, name" </font> size="+/-value/fixed size" color="color value" Note: the font tag is being phased out in favor of CSS styles. size="XX" width="XX/XX%" noshade </hr> or <hr />

Horizontal Rule

<hr>

Block Quote <blockquote> none Division <div> align="left/center/right"

</blockquote> </div>

List Tags Function Unordered List Ordered List List Item Definiton List Definition List Item Start Tag Attributes <ul> <ol> <li> <dl> <dt> type="disc/circle/square" End Tag </ul>

type="I/A/1/a/i" </ol> start="value to start counting at" type=all ul and ol options none none none </li> </dl> </dt> </dd>

Definition List Definition <dd>

Gaurav Paliwal : www.gauravtech.in (Web Technology)

Gaurav Paliwal : www.gauravtech.in (Web Technology) Link Tags Function Anchor Link Anchor Mark Start Tag <a> <a> Attributes href="filename" target="windowname" name="markname" End Tag </a> </a>

Image Tags Function Insert Image Start Tag <img> Attributes src="filename" align="left/right" width="XXX" height="XXX" alt="text that desribes image" ISMAP USEMAP="#mapname" End Tag </img>

Client-side Imagemap Tags Function Define Map Area Definition Start Tag <map> <area> Attributes name="mapname" shape="rect/circle/poly/point" coords="X,Y,X,Y" href="imagename" End Tag </map> </area>

Gaurav Paliwal : www.gauravtech.in (Web Technology)

Gaurav Paliwal : www.gauravtech.in (Web Technology) Table Tags Function Table Start Tag <table> Attributes border="X" width="XX/X%" cellspacing="XX" cellpadding="XX" bgcolor="color value" background="filename" align="left/center/right" valign="top/middle/bottom" bgcolor="color value" align="left/center/right" valign="top/middle/bottom" width=X nowrap colspan="X" rowspan="X" bgcolor="color value" align="left/center/right" valign="top/middle/bottom" width=X nowrap colspan="X" rowspan="X" bgcolor="color value" End Tag </table>

Table Row

<tr>

</tr>

Table Data

<td>

</td>

Table Header

<th>

</th>

Caption

<caption> align="left/center/right" valign="top/middle/bottom"

</caption>

Frame Tags Function Set Frames Start Tag <frameset> Attributes cols="XX/XX%/*" rows="XX/XX%/*" End Tag </frameset>

Gaurav Paliwal : www.gauravtech.in (Web Technology)

Gaurav Paliwal : www.gauravtech.in (Web Technology) Frame Definition <frame> src="filename" name="framename" noresize scroll=auto/yes/no marginwidth="XX" marginheight="XX" target="framename"/ "_self"/ "_top"/ "_parent" (Note the underscores) </frame>

Base

<base>

</base>

No Frames

<noframes> Between start and end tags, place the content that appears when a nonframes browser loads this page.

</noframes>

Form Tags Function Form Input Field Start Tag <form> <input> Attributes method=get/put action="programname" name="variablename" type=text/password/ checkbox/radio/submit/ reset/image name="variablename" size=XX multiple none name="variablename"
rows=XX cols=XX

End Tag </form> </input>

Selection List

<select>

</select>

Selection Option Scrolling Text Field

<option> <textarea>

</option> </textarea>

Gaurav Paliwal : www.gauravtech.in (Web Technology)

Gaurav Paliwal : www.gauravtech.in (Web Technology) Meta Tags Function <meta> (Server metatags) Start Tag http-equiv="refresh" content="seconds, filename" Attributes End Tag none </meta> </meta>

<meta> name="keywords/description/author/ none (Content metatags) generator/abstract/expiration" content="your information"

Style Sheet Tags Function Style Definition Area Link to external CSS File Start Tag Attributes <style> type="text/css"> Style declarations go between begin and end style tags rel=stylesheet type="text/css" href="URL" End Tag </style>

<link>

none

Commonly-Used Special Characters Name ampersand cent sign copyright symbol degree sign greater than less than Symbol & > < HTML Equivalent &amp; &cent; &copy; or &#169; &deg; &gt; &lt;

Gaurav Paliwal : www.gauravtech.in (Web Technology)

Gaurav Paliwal : www.gauravtech.in (Web Technology) non-breaking space registered trademark trademark &nbsp; &#174; &#153;

Gaurav Paliwal : www.gauravtech.in (Web Technology)

You might also like