HTML CheatSheet
HTML CheatSheet
Rule #1: HTML works with <TAGs>. Most tags have an opening <TAG> and a closing </TAG>
Rule #2: Some tags only need one tag (no opening and closing tags) such as <BR/> (Notice the position of the / character)
Rule #3: You can embed tags but make sure you respect the order for opening/closing the tags.
Rule #4: Each tag can be customised using attributes: <BODY bgcolor=“#FF0000”> (BGColor is an attribute of the BODY tag)
Variable Assignment
Basic HTML Structure Adding Hyperlinks
<HTML>
<HEAD> <a href=“http://www.google.com“>Google</a>
<TITLE>My website title</TITLE>
</HEAD> Using Tables
<BODY>
Welcome to my first webpage... <TABLE WIDTH=“100%” BORDER=“1” CELLPADDING=“5”
</BODY> CELLSPACING=“0”>
</HTML> <TR>
<TD VALIGN=“TOP”>Row 1, Column 1</TD>
Body Attributes <TD VALIGN=“TOP”>Row 1, Column 2</TD>
</TR>
bgcolor=“#FF00FF” Background Colour <TR>
leftmargin=“10” <TD VALIGN=“TOP”>Row 2, Column 1</TD>
Side Margin Size in Pixels
<TD VALIGN=“TOP”>Row 2, Column 2</TD>
topmargin=“10” Top Margin Size in Pixels </TR>
background=“myPic.png” Background Image </TABLE>