Quick HTML tags reference

The following table lists HTML tags (in alphabetical order) with:

  • HTML tag name
  • description of the HTML tag
  • indication whether or not closing tag is required
  • attributes of each HTML tag
Table 1 HTML Tags – Quick Reference
HTML TagTag NameDescriptionClosing TagAttributes
<!–HTML comment text->CommentIdentifies sections of HTML codeNoN/A
<a>AnchorCreates hypertext linksYestarget, href, name
<address>AddressDisplays text in italicsYesstyle, id, class, lang, dir, title
<applet>AppletRuns Java appletsYesalt, code, align, width, height, codebase, hspace, vspace
<area>AreaCreates a clickable area (also known as hotspot) on an imagemapNocoords, href, nohref, shape
<B>BoldMake text boldYesstyle, id, class, lang, dir, title
<blockquote>Block quoteIndents text from both left and right marginsYescite, style, id, class, lang, dir, title
<body>BodyDefines the body of an HTML documentYesbackGround, bgColor, aLink, vLink, text
<br>Line breakEnds the current line.Noclear, style, id, class, lang, dir, title
<caption>Captioncreates a caption for an HTML tableYesalign, style, id, class, lang, dir, title
<center>CenterCenters textYesalign, style, id, class, lang, dir, title
<cite>CitationUsed for indicating a source used as a citationYesalign, style, id, class, lang, dir, title
<code>CodeDisplays text in a fixed width fontYesalign, style, id, class, lang, dir, title
<div>Logical divisionDivides an HTML document into logical sectionsYesalign, style, id, class, lang, dir, title
<dl>Definition listCreates a definition listYesalign, style, id, class, lang, dir, title
<dt>Definition termCreates a definition list termYesstyle, id, class, lang, dir, title
<embed>Embedinserts media files (i.e, background sounds) into web pagesNosrc, autostart, loop, volume, width, height
<font>Fontsets font size, color, and faceYessize, color, face
<form>FormCreates a form for a user to enter dataYesaction, method, target, style, id, class, lang, dir, title
<frame>FrameDefines a frame (window)Nosrc, name, marginwidth, marginheight, scrolling, noresize
<frameset>FramesetDefines the framesetYesrows, cols, border
<h1>Heading level 1Creates a first-level headingYesalign, style, id, class, lang, dir, title
<h2>Heading level 2Creates a second-level headingYesalign, style, id, class, lang, dir, title
<h3>Heading level 3Creates a third-level headingYesalign, style, id, class, lang, dir, title
<h4>Heading level 4Creates a fourth-level headingYesalign, style, id, class, lang, dir, title
<h5>Heading level 5Creates a fifth-level headingYesalign, style, id, class, lang, dir, title
<h6>Heading level 6Creates a sixth-level headingYesalign, style, id, class, lang, dir, title
<head>Head or headerDefines head section of an HTML documentYeslang, dir
<hr>Horizontal ruleCreates a horizontal line across a web pageNosize, width, align, noshade, align, style, id, class, lang, dir, title
<html>HTMLContains the head and body section of an HTML document (web page)Yeslang, dir
<i>ItalicMakes text italicYesstyle, id, class, lang, dir, title
<img>Inline imageInserts an inline image into an HTMl documentNosrc, height, width, alt, title, border, align, hspace, vspace
<input>Form inputCreates form fields such as text boxes, check boxes, submit button, and reset buttonNotype, value, name, size, maxlength, checked, align, accept, readonly, style, id, class, lang, dir, title
<lh>List headingCreates a list headingYestype, value, style, id, class, lang, dir, title
<li>List itemCreates a list itemYestype, value, style, id, class, lang, dir, title
<link>LinkCreates hyperlinks to documents or files, including style sheetsNorel, rev, href, target, type, media, charset, style, id, class, lang, dir, title
<map>MapUsed with a client-side imagemapYesname, style, id, class, lang, dir, title
<meta>MetaDescribes information about an HTML documentNoname, content, http-equiv, scheme, lang, dir
<ol>Ordered listCreates an ordered listYestype, style, id, class, lang, dir, title
<option>OptionDefines an option item for a selction listYesvalue, selected, style, id, class, lang, dir, title
<p>ParagraphCreates a paragraphYeswidth, style, id, class, lang, dir, title
<pre>Preformatted textCreates a section of preformatted textYeswidth, style, id, class, lang, dir, title
<script>ScriptSpecifies the scripting language used in the HTML documentYeslanguage
<select>Form selectCreates a selction menu in an HTML formYesname, size, disabled, multiple, style, id, class, lang, dir, title
<strike>Strike-throughDraws a line through textYesstyle, id, class, lang, dir, title
<sub>SubscriptCreates a subscripted textYesstyle, id, class, lang, dir, title
<sup>SuperscriptCreates a superscript textYesstyle, id, class, lang, dir, title
<table>TableCreates a table in an HTML documentYesalign, width, cellpadding, cellspacing, border, bgcolor, style, id, class, lang, dir, title
<td>Table dataCreates a column or cell in a tableYesbgcolor, rowspan, colspan, nowrap, valign, width, height, style, id, class, lang, dir, title
<textarea>Form text areaCreates a text area in formYesname, rows, cols, disabled, readonly, style, id, class, lang, dir, title
<th>Table headingCreates a cell as a table heading (displays text as centered and bold)Yesbgcolor, rowspan, style, id, class, lang, dir, title
<title>TitleCreates HTML document’s title (displayed at the top of the browser window)Yeslang, dir
<tr>Table rowCreates a table rowYesbgcolor, align, valign, style, id, class, lang, dir, title
<u>UnderlinedUnderlines textYesstyle, id, class, lang, dir, title
<ul>Unordered listCreates an unordered listYesstyle, id, class, lang, dir, title