You are on page 1of 3

Basic HTML Commands

(all commands are lower case)


Basic Structure:
<html>

<head>
<title> George's Home Page </title>
</head>

<body>

</body>
</html>

Formatting Text Open/Close Flags:
Bold face <b> </b>
Italics <i> </i>
Typewriter Font <tt> </tt>
Center Text <center> </center>
Flashing Text <blink> </blink>

Formatting Text Single Flags:
Line Across Page <hr> or <hr width= "XX%">
<hr size= "X">
Carriage Return <br>
Blank Line <p>

Heading Commands:
Sizes: LARGEST 1 to smallest 6.
<h1> </h1>
(No need to add a <p> as it is added automatically with a Heading)

Font Size Commands:
Sizes: LARGEST +6 to smallest -6
<font size = "+3"> </font>

Links To Other Pages :
<a href = "http://www.bctel.com"> B.C. Telephone</a>

Background Color:
<body bgcolor = "#XXXXXX"> where XXXXXX is a given code

Text Color:
<body text = "#XXXXXX"> Color of text
<body link = "#XXXXXX"> Color of text for a link
<body alink = "#XXXXXX"> Color of text for a link when clicked
<body vlink = "#XXXXXX"> Color of text for a link when visited
<font color="#XXXXXX"> text here </font>



PICTURES:
<img src = "image.gif">
Activate an image
<a href = "http://www.bctel.com"><img src = "image.gif"></a>

Align Images:
Default is to left use img src = "image.gif"
To put into middle use <center> <img src = "image.gif"> </center>
To align to the right side use <img align= "right" src = "image.gif">

Align Text with images:
<img align ="Top" src = "image.gif"> Add text here
<img align ="Middle" src = "image.gif"> Add text here
<img align ="Bottom" src = "image.gif"> Add text here

Change Image Size:
<img height = "XX" width = "XX" src = "image.gif">
XX as the pixel size of the image. You will have to play with the numbers to find the original
size. Hint use i_view32.exe in Shared and the Statistics option to get the original size.

Body Background Image:
<body background = "image.gif">



Getting Started:

<html>
<head><title>
Put title in here
</title></head>

<body>
or
<body bgcolor="#XXXXXX">
or
<body background = "image.gif">

</body>
</html>



Making Unordered Lists (no numbers)

<ul>
<li> Data
<li> Data
<li> Data
<li> Data
</ul>



Making Ordered Lists (numbers)

<ol>
<li> Data
<li> Data
<li> Data
<li> Data
</ol>

Making Tables

<table>
or
<table border=0>
<caption> Title of table </caption>
<td> Data or to add color use <td bgcolor="#XXXXXX">Data
<td> Data
<td> Data<tr>
<td> Data
<td> Data
<td> Data<tr>
</tr>
</td>

</table>

Page Jump

Internal Link <a href="#codeword">Jump to There </a>

Internal Anchor <a name="codeword">

HTML Authoring


HTML Goodies
http://www.htmlgoodies.com/

Nice Basic HTML Tutorial
http://www.askkenny.com/

You might also like