Now, class, read the section on commands to learn the language itself. When you have finished, we will go over some examples of HTML and further formatting instructions (coming VERY soon).
Back to Top
COMMAND | NOTES | LANGUAGE EXAMPLE | EXAMPLE RESULTS |
<html></html> | Not required Should incase entire html file | N/A | N/A |
<title></title> | Required Names the file | <title>My Page</title> | Top of browser window will read: "My Page" |
<head></head> | Not required Should incase entire heading | N/A | N/A |
<body></body> | Not required Should incase entire body | N/A | N/A |
<body background= "URL"> | Picture background (tiled) | <body background= "http://www.geocities.com/bg.jpg"> | Background will be "bg.jpg". |
<body bgcolor="hex code"> | Background color | <body bgcolor="#FFFFFF"> | Background will be white |
<body text="hex code"> | Text color | <body bgcolor="#000000"> | Text will be black |
<body link="hex code"> | Link color | <body link="#00A0DD"> | Links will be light blue |
<body vlink="hex code"> | Visited link color | <body vlink=#00A0DD""> | Visited links will be light blue |
<body alink="hex code"> | Active link color | <body alink="#00A0DD"> | Active links will be light blue |
<hsize></hsize> | Font(heading) size Size=1(large) to 6(small) | <h1>Start</h1> | Font(heading), "Start", is large |
<big></big> | Large font size | <big>dog</big> | The word, "dog", is big |
<small></small> | Small font size | <small>dog</small> | The word, "dog", is small |
<b></b> | Bold | <b>dog</b> | The word ,"dog", is bold |
<i></i> | Italic | <i>dog</i> | The word ,"dog", is italic |
<u></u> | Underline | <u>dog</u> | The word, "dog", is underlined |
<s></s> | Strikeout | <s>dog</s> | The word, "dog", is crossed out |
<tt></tt> | Typewriter font | <tt>dog</tt> | The word, "dog", is in a typewriter font |
<sub></sub> | Subscript | <sub>dog</sub> | "dog" looks like this: dog |
<sup></sup> | Superscript | <sup>dog</sup> | "dog" looks like this: dog |
<pre></pre> | Peformatted How you type it is how it appears | <pre>This has 2 spaces</pre> | Will show up with 2 spaces in between the words. Normally, 2 spaces would be counted as 1 |
<blink></blink> | Blink | <blink>dog</blink> | The word, "dog", will blink/flash |
<center></center> | Centers anything Used VERY often | <center>dog</center> | Centers the word, "dog" |
<font size=size></font> | Font size Size=1(large) to 7(small) | <font size=7>dog</font> | The word, "dog" is very small |
<font color="hex code"></font> | Font color | <font color="#00A0DD">dog</font> | The word, "dog", is light blue |
<br> | Break right Ends line and begins next | end of line<br>next line | Looks like this: end of line next line |
<p> | Breaks right twice | end of 2 lines<p>next line | N/A |
<hr> | Horizontal rule Draws a long line horizontally | <hr> | |
<a href="URL"></a> | Link to something href=hyper refrence | <a href="http://www.yahoo.com>Yahoo</a> | The word, "Yahoo", is a link to www.yahoo.com |
<a href="URL#name"></a> | Link to target (in another page) name=target name | <a href="http://www.yahoo.com#Here">I</a> | The word, "I", links to the target on yahoo page named "Here" (if one exists) |
<a href="#name"></a> | Link to target (on same page) | <a href="#Here">I</a> | The word, "I", is a link to the target, "Here", on the current page |
<a name="name"></a> | Define Target | <a name="Here">bla, bla</a> | Defines "bla, bla" as the target, "Here" |
<img src="URL"> | Display image | <img src="http://www.geocities.com/pic.gif"> | Displays "pic.gif" |
<img src="URL" align=where> | Alignment of image Where=top/bottom/middle/left/right | <img src="http://www.geocities.com/pic.gif" align=left> | Image will appear on the left |
<img src="URL" alt="words"> | Alternate When image not displayed, alternate shows up. Words=any words | <img src="http://www.geocities.com/pic.gif" alt="Cool Image"> | Dislays the words, "Cool Image", until "pic.gif" is brought up |
<img src="URL" width=pixels height=pixels> | Dimensions Pixels=# of pixels | <img src="http://www.geocities.com/pic.gif" width=125 height=125> | "Pic.gif" will have a width and height of 125 pixels |
<img src="URL" border=number> | Border Number=size of borders | <img src="http://www.geocities.com/pic.gif" border=0> | "Pic.gif" has no border |
<img src="URL" hspace=pixels vspace=pixels> | Space around image | <img src="http://www.geocities.com/pic.gif" hspace=5 vspace=5> | "Pic.gif" has a space of 5 pixels on every side |
<embed src="URL"> | Embed/insert an object Used to run music-see tips Dimension commands can be used | <embed src="http://www.geocities.com/pic.gif"> | Embeds "pic.gif" into page |
<ul><li></ul> | Unordered list <li> before each list item | ||
<ul compact></ul> | Compact unordered list The compact command will work for all lists | ||
<ul type=bullet> | Bullet type Bullet=disc/circle/square | ||
<ol><li></ol> | Ordered list <li> before each list item | ||
<ol type=numbering type> | Numbering type Numbering Type=A/a/I/i/1 | ||
<ol start=type start> | Staring number/letter start type=starting letter/number | ||
<dl><dt><dd></dl> | Definition list <dt> before each term AND <dd> before each definition | ||
<menu><li></menu> | <li> before each list item | ||
<dir><li></dir> | <li> before each list item | ||
-The width commands can be used for cells and/or the entire table- -The alignment commands can be used for both cells and rows- | |||
<table></table> | Define table Must incase entire table | ||
<table border=number> | Table Border Number=size of border | ||
<table cellspacing=number> | Cell padding Number=size of padding | ||
<table cellpadding=number> | Cell spacing Number=size of spacing | ||
<table width=pixels> | Desired width Pixels=number of pixels | ||
<table width="percent"> | Width percent Percent=percent of page | ||
<tr></tr> | Table row Must incase entire row | ||
<tr align=where> OR <tr valign=where> | Alignment Where=left/right/center/middle/bottom OR top/bottom/middle | ||
<td></td> | Table cell Must incase entire cell | ||
<td colspan=number> | Columns to span Number=how many colomns the cell is to take up | ||
<td rowspan=number> | Rows to span Number=how many rows the cell is to take up | ||
<td bgcolor=hex code> | Cell color | ||