You are on page 1of 2

HTML

Quick Reference Card


The Fundamentals
HTML stands for HyperText HTML uses tags to tell web
Markup Language and is used to create web pages.

Customizable Print On-Demand Courseware


1502 Nicollet Avenue, Suite 1, Minneapolis, MN 55417 Tel. (888) 903-2432 www.customguide.com

Paragraphs and Divisions


Example of HTML
<HTML> <HEAD> <TITLE>Report on Snails</TITLE> <! -These are comments that will not appear in the web page- > </HEAD> <BODY> <H1>Introduction to Snails</H1> <P>Snails are any of as many as 50,000 marine or Tag/Attribute Align Text Division Headings Description Aligns paragraphs Defines a division Displays the specified hierarchical heading level (1-6) Draws a line across the screen Horizontal Rule HR Rule Alignment A horizontal rule's alignment The line thickness of a HR HR Thickness The length of a horizontal rule HR Width Starts a new line (without any Line Break additional spacing) Prevents line breaks No Break Starts a new paragraph Paragraph Where to break if needed Word Break Tag/Attribute Compact Definition List Definition List Item Definition Text Directory List List Items Menu Ordered List Numbering Type Numbering Type Starting Number Starting Number Syntax <P LEFTCENTERRIGHT JUSTIFIED > </P> <DIV></DIV> <H1></H1><H6></H6> <HR> <HR LEFTCENTERRIGHT > <HR SIZE=n> (in pixels) <HR WIDTH=n> (in pixels or %) <LB> <NOBR></NOBR> <P> <WBR> Syntax COMPACT <DL></DL> <DT> <DD> <DIR></DIR> <LI> <MENU></MENU> <OL></OL> <OL TYPE=A | a | I | i | 1> <LI TYPE=A | a | I | i | 1> <OL START=?> <LI START=?> Syntax MAILTO:email@domain.com <A HREF="#link"></A> <A HREF="url#link"></A> <A HREF="url" TARGET="_blank_parent_ self_top"></A>

browsers what appears in the web page and how it should be formatted. begins with a forward slash (i.e. <B></B>).

Some tags require a closing tag that Some tags may have attributes to

provide additional information to the web browser.

URLs
Uniform Resource Locators specify the location of files on the WWW. URLs may include the resource type (http://), server address
(www.cnet.com), path (/reviews/), and file name (toshiba.html). For example: http://www.cnet.com/reviews/toshiba.html.
Description Beginning and ending of file Page title, must be in the header Descriptive information, such as page title, content, etc. The bulk of the web page Description Changes default font size from 1 to 7 (3 is the default setting) Increase in font size Makes text blink on and off Boldfaces text Indicates a work cited Font color in hexadecimal number Font type, such as Arial Font size from 1 to 7 Font size in points Syntax <HTML></HTML> <TITLE></TITLE> <HEAD></HEAD> <BODY></BODY> Syntax <BASEFONT SIZE = num>

Lists

Essential Page Elements


Tag/Attribute Document Type Title Header Body Tag/Attribute Base Font Size Bigger Blinking Bold Citation Font Color Font Face Font Size Font Size (Points) Font Weight Italic Non-Breaking Space Overstrike Plain Text Preformatted Text Quote Regular Emphasis Sample Output Smaller Source Code Strong Emphasis Subscript Superscript Typewriter Style Underline

Description Compacted list List of terms and definitions Item to be defined Definition for the previous item List of short items A single item on a list Displays a menu list Numbered list (for the entire list) (for this & subsequent items) (for the entire list) (for this & subsequent items) Description Where to send e-mail (In the same document) (In another document) Where a new document or web page appear, i.e. in the same window or in a new window

Working with Text


<BIG></BIG> <BLINK></BLINK> <B></B> <CITE></CITE> FONT COLOR ="#rrggbb"> </FONT> FONT FACE="face"</FONT> FONT SIZE="n"</FONT> <FONT POINT-SIZE=?> </FONT> Font weight or boldness <FONT WEIGHT=?></FONT> Italicizes text <I></I> Non-Breaking Space Character &NBSP; Strike through text Disables tag processing Displays text exactly as is Quotations Usually italicizes text For literal characters Decrease in font size For computer source code listings Usually bolds text Subscripts text Superscripts text Fixed width font Underlines text <S></S> <PLAINTEXT></PLAINTEXT> <PRE></PRE> <Q></Q> <EM></EM> <SAMP></SAMP> <SMALL></SMALL> <CODE></CODE> <STRONG></STRONG> <SUB></SUB> <SUP></SUP> <TT></TT> <U></U>

Hyperlinks
Tag/Attribute E-mail Link to Location Link to Location Target Window

Forms
Tag/Attribute Checked Define Form Field Name Field Size Field Value Input Field Description Use with check/radio boxes Defines the area of the web page used as a form The field name (required) Field size in characters The field value Inserts a certain type of input field such as a text box, check box, or button Syntax <INPUT CHECKED> <FORM ACTION="url" METHOD=GET|POST></FORM> <INPUT NAME="name"> <INPUT SIZE="n"> <INPUT VALUE="value"> <INPUT TYPE= "TEXT|PASSWORD| CHECKBOX|RADIO| FILE|BUTTON|IMAGE|HIDDEN| SUBMIT|RESET"> Items in a list or combo box <SELECT></SELECT> Maximum length in characters <INPUT MAXLENGTH=?> Creates an option list <OPTION></OPTION> Message in input field <INPUT PROMPT="text"> Character & " Code &amp; &quot; Character Non-Breaking Space Code &nbsp;

List Items Max Length Option List Prompt Character < >

Special Characters
Code &lt; &gt;

2000 CustomGuide. All rights reserved.

Tel. (888) 903-2432 www.customguide.com

Images
Tag/Attribute Insert Image Height Width Alternative Text Border Align Description The URL of the image to display The image height in pixels The image width in pixels Displays alternative text The images border size in pixel Aligns the image on the page Syntax <IMG SRC="filename"> <IMG HEIGHT=n> <IMG WIDTH=n> <IMG ALT="text"> <IMG BORDER=n> <IMG ALIGN="Absbottom|Absmiddle| Baseline|Bottom|Center|Left| Middle|Right|Top>

Background and Colors


Colors values in HTML are entered using a hexadecimal code (#rrggbb), which uses numbers (0-9) and letters (A-F).
Tag/Attribute Description Syntax <BODY BACKGROUND="image" <BODY BGCOLOR=#rrggbb <BODY TEXT="#rrggbb"> <BODY LINK="#rrggbb"> <BODY VLINK="#rrggbb"> <BODY ALINK="#rrggbb"> <BODY BGPROPERTIES="FIXED"> Background Image Specify an image to use as the background for a web page Background Color The backgrounds color The default text color Text Color Color of unvisited links Link Color Color of visited links Visited Links Color of the currently active link Active Link Specifies that the background Watermarked image scrolls with the web page Background

Cascading Style Sheets (CSS)

To Redefine an HTML Tag: Enter the tag and CSS definition, for

example: TAG{PROPERTY1,VALUE1,PROPERTY2,VALUE2} .TAG{PROPERTY1,VALUE1,PROPERTY2,VALUE2}

To Create a New Tag: Precede the tag with a period, for example: To Attach a Style Sheet: Enter the code between the

RGB Hexadecimal Color Chart

<HEAD></HEAD> tabs using the following syntax: <LINK REL="STYLESHEET"HREF="stylesheet.css">


Values left, right center none, blink, underline, underline, line-through 0, number of pixels, % none, uppercase, lowercase, capitalize Table width in pixels or % number of points or % normal, italic, oblique Description Indicates that there is a table Alignment of the table on the page The tables border in pixels The border color Tag/Attribute color font-weight

Tag/Attribute text-align text-decoration text-indent text-transform font-family font-size font-style

Values

Text color in "#rrggbb normal, lighter, bold, bolder, 100900 list-style-image URL(#image) disc, circle, square, list-style-type decimal, lower-alpha, lower-roman, upper alpha, upper roman URL(#image) backgroundimage Syntax

Tables

Tag/Attribute Define Table Table Alignment

<TABLE></TABLE> <TABLE ALIGN=LEFT|RIGHT|CENTER> <TABLE BORDER=n> Border <TABLE Border Color BORDERCOLOR="#rrggbb"> Table width in pixels or % <TABLE WIDTH=n> Table Width Items in a table row <TR></TR> Row The alignment of text in a cell <TR ALIGN=LEFT | RIGHT | Cell Alignment CENTER | MIDDLE | BOTTOM> The cells background color <TD BGCOLOR="#rrggbb"> Cell Color Space between cell and text <TABLE CELLPADDING=n> Cell Padding Amount of space between cells <TABLE CELLSPACING=n> Cell Spacing Desired cell width pixels or % <TD WIDTH =n> Cell Width Cell No Linebreaks Specify if text can wrap in a cell <TD NOWRAP> Columns to Span Number of columns a cell spans <TD ROWSPAN=?> Number of rows a cell spans <TD COLSPAN=?> Rows to Span The tables caption or title <CAPTION></CAPTION> Title

Example of a Table
<TABLE WIDTH="85%" BORDER="1" ALIGN="CENTER"> <TR> <TH>Product</TH> <TH>Price</TH> </TR> <TR> <TD>Gadgets</TD> <TD>$5.00</TD> </TR> <TR> <TD>Gizmos</TD> <TD>$18.00</TD> </TR> </TABLE>

2000 CustomGuide. All rights reserved.

Tel. (888) 903-2432 www.customguide.com

You might also like