Department of Mathematics

Math 300: Mathematical Computing

HTML Cheat Sheet

Here we summarize some of the most common HTML tags and their uses. This is not a tutorial. It is simply a quick reference for those who already have some experience in typing HTML from scratch, or who need to repair damaged HTML that was generated by an editor.

HTML Tag Closing tag? Purpose Example Result
a Yes Make an anchor - a link to another web location <a href="mypage.html">Here is what the user sees</a> Here is what the user sees
b Yes Set enclosed text in bold face <b>This text is bold</b> This text is bold
body Yes Delimits the part of the HTML that will be visible in a browser
br No Make a line break Text on one line<br> and text on another line Text on one line
and text on another line
div Yes A division of the text - e.g. a section. This is usually used to apply formatting attributes.
dl,dt,dd Yes Definition list - definition term and definition data

<dl><dt>Wazzu!</dt><dd>An affectionate moniker for WSU, once banned, but now acceptable again.</dd></dl>

An affectionate moniker for WSU, once banned, but now acceptable again.

em Yes Emphasis <em>This is emphasized</em> This is emphasized
head Yes Delimits the header information
hr No Make a horizontal rule <hr style="width: 80%; height: 5px">
h1,h2,...,h6 Yes Different levels of heading typesetting <h1>Major Header</h1><h3>Minor Header</h3>

Major Header

Minor Header

i Yes Italicize <i>This is italicized</i> This is italicized
img No Insert an image into the document <img src= "" width="40" height="40" alt="Math people"> Math people
link No Can read external resources into an HTML file. This tag must appear in the header information.
ol,li Yes Make an ordered (numbered) list <ol><li>First item</li><li>Second item</li></ol>

  1. First item
  2. Second item
p Yes Make a paragraph <p>Here is a paragraph</p><p>Here is another</p>

Here is a paragraph

Here is another

span Yes Delimits text to be formatted differently from that around it (usually a small amount) Here is a way to get <span style="font-weight:bold">bold faced text Here is a way to get bold faced text
style Yes Grouping tag for style attributes of HTML tags. We set procedural markup here... This must appear in the header information. See CSS information for examples and details.
sub,sup Yes Make an expression with a sub- or superscripts X<sub>i</sub><sup>2</sup> Xi2
table,th,tr,td Yes Make a table, with headers, rows, and data <table><tr><th>Header1 </th><th>Header2 </th></tr><tr><td>Data1 </td><td>Data2 </td></tr></table>
Header1 Header2
Data1 Data2
ul,li Yes Make an unordered list

<ul><li> Item1</li> <li> Item2</li> </ul>

  • Item1
  • Item2



Assignment 7 is posted.

A solution to the exam has been posted.

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 1996-2015 Kevin Cooper