HTML Cheat Sheet

Paragraphs and Breaks: (Generally, these tags do not come in pairs; although, it is a good habit to close the paragraph tag.)
<P></P>   Use this tag to begin a new paragraph.
  <BR>  Use this tag if you want to start the text on the next line.
<HR>     This tag stands for Horizontal Reference.
  This will draw a line between two paragraphs.
&nbsp; By adding this code, you can add one blank space in your text.
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If you want more than one blank space, you need to add a string of the code. This example will give you five blank spaces, or a good tab marker.
Aligning the Text:  The default alignment with the <P> tag is left margin. To change the alignment, use one of the following tags. Remember, until you change the alignment or close it </>, all of the text will stay aligned the same way.
<P></P> or <P ALIGN=“LEFT”></P>  Use these tags to align the text along the left margin.
<P ALIGN=“center”></P>   Use this tag to center the text.
<P ALIGN=“right”></P> Use this tag to align the text on the right margin.
<CENTER></CENTER>   Use this if you don’t want spacing.
<RIGHT></RIGHT>     Use this if you don’t want spacing.
Font style: to add emphasis to the text:  
<STRONG></STRONG> The ‘strong’ tag makes the text bold.
<EM></EM>    The ‘emphasis’ tag makes the text in italics.
<U></U>       The ‘u’ tag underlines the text. But in general, I try to avoid using this because underlined text is generally used for a link. See below.
Font Size:  
<FONT SIZE = “Value”> </FONT>       The ‘font size’ tag is used to change the point size of the font.
    Font Size    Point Size  

Ø      7          36pt

Ø      6          24 pt

Ø      5          18 pt

Ø      4          14 pt

Ø      3          12 pt

Ø      2          10 pt

Ø      1          8   pt  

 
Unordered List:  

<UL>
<LI>Item 1</LI>
<LI>Item 2</LI>
<LI>Item 3</LI>
</UL>

The “UL” tag is used to create an unordered/bulleted list. The ‘LI’ tag is around each item of the list. It is not necessary to indent the LI, but it makes it easier to read if you have to check your code.

  • Item 1
  • Item 2
  • Item 3
 
Ordered List:  

<OL>
<LI>Item</LI>
<LI>Item</LI>
<LI>Item</LI>
</OL>

The ‘OL’ tag is used for an ordered/numbered list. The ‘LI’ goes around each item.
      1. Item
      2. Item
      3. Item
 
Hyperlink Reference to a Webpage:  
This can be done two ways.  

Either <A HREF = “URL”> Link Name </A>

<A HREF = “m-w.com”> Merriam Webster </A>

  This will show up as an underlined text Merriam Webster and open up the link in the same window. This means that your students will have to click the back button in the Web Browser to get back to the documents page.
 

Or by adding <TARGET = “?”> to the code.
<A HREF = “m-w.com” TARGET = “dictionary”> Merriam Webster </A>

  The question mark is an arbitrary name for the new window. It will appear the same in the browser as in the above example, but now it will open a new browser window called dictionary.