Selected HTML commands
|
<html>....</html> |
Marks the beginning and end of an HTML document |
|
<head>....</head> |
Encloses title of document only |
|
<title>....</title> |
Name of document shown in browser window. This is what someone who bookmarks your page sees in their bookmark file. |
| Your body command or body background command is not used UNTIL you turn off title and head. | |
|
<body>....</body> |
Encloses body: Main text of page. |
|
<b>....</b> |
Bold |
|
<i>....</i> |
Italic |
|
<u>....</u> |
Underline |
|
<center>....</center> |
Centers text |
|
<h1>....</h1> |
Heading 1, largest header font |
|
<h2>....</h2> |
Heading 2, second largest header font (h3,h4, etc. are all decreasing font size. |
|
<li> |
List item |
|
<ul><li>....</ul> |
Creates a bulleted list |
|
<ol><li>....</ol> |
Creates an ordered list: numbered list |
|
<br> |
Line break. Restarts text on next line. |
|
<p>....</p> |
Denotes a paragraph |
|
<hr> |
Horizontal rule: Makes a horizontal line |
|
<a href="http://www.ksu.edu">Text</a> is the general form for a URL. |
Hypertext link to another Web site. If you are referring to a file that you have created that is in the same general storage location as where you currently are at, you can simply type in the name of the file you want the hypertext link to send you to. |
|
<img src="test.gif"> |
Places image on web page |
|
<img src="test.gif" height="xx" width="xx"> |
Allows you to adjust the height and width of a image |
|
One of the easiest ways to align a image with text is to place both in a table. If you want two or more images side-by-side, place them in a table also. |
The appropriate table commands are covered later in this sheet |
|
<body background ="purple.jpg">....</body> |
Allows you to use a background stored on a disk as the background for your web page. Note: Do not use BOTH the body and body background commands. Use one or the other. |
|
The correct coding sequence for your web page is </title> </head> <body background > |
Your web page may not properly display in older browsers when this coding sequence is not used. This is technically the correct coding sequence, and that is one of the grading criteria: using the HTML code correctly. |
|
<body bgcolor = "#rrggbb"> ....</body> |
Uses hexadecimal colors to add a background to your web page |
|
<a href="mailto:full e-mail address">e-mail </a> |
Hypertext link that allow you to send e-mail from a Web page. |
|
Copyright © |
Creates copyright symbol |
|
<table>....</table> |
Defines table |
|
<table border>....</table> |
Creates table with a border. Note: Do not use BOTH the table and table border commands. Use one or the other. |
|
<tr>....</tr> |
Specifies a row within the table |
|
<td>....</td> |
Defines an individual cell in a table |
|
<caption>....</caption> |
Creates a centered title at the top of the table |
| <font color= ?>....</font> |
Sets font color, using name or hexadecimal value |
Most browsers and monitors will support whatever color that you wish, but please be aware that some will not support all colors. The best thing to do is simply use basic colors.
<font color=red>....</font> .
If for some reason that does not work, you can also use the hexadecimal code.
<font color=#FF3333>....</font> will also return a red color.
The following is a list of selected hexadecimal colors. Do not forget to use the number sign (#) to begin each hexadecimal color. Remember that each color code is enclosed in quotes.