 |  | |
Tutorial/Guide/Help for HTML Programming Codes
Untitled Document
THE BARE BONES GUIDE TO HTML
Version 4.0 Formatted -- February 1999
The latest version of this document is available at http://werbach.com/barebones, where you will also find the text version, translations, and background materials.
The Bare Bones Guide to HTML lists all the tags that current browsers are likely to recognize. I have included all the elements in the official HTML 4.0 recommendation with common attributes, as well as Netscape and Microsoft extensions. This document is a quick reference, not a complete specification; for official information about HTML and its development, see the World Wide Web Consortium site at http://www.w3.org/MarkUp/.
The Guide is designed to be as concise as possible, and therefore it doesn't go into any detail about how to use the various tags. A few tags link to notes that address frequently-asked questions.
Table of Contents
HTML TAGS
BASIC ELEMENTS
|
| Document Type |
<HTML></HTML> |
(beginning and end of file) |
| Title |
<TITLE></TITLE> |
(must be in header) |
| Header |
<HEAD></HEAD> |
(descriptive info, such as title) |
| Body |
<BODY></BODY> |
(bulk of the page) |
STRUCTURAL DEFINITION
|
| Heading |
<H?></H?> |
(the spec. defines 6 levels) |
| Align Heading |
<H? ALIGN=LEFT|CENTER|RIGHT></H?> |
| Division |
<DIV></DIV> |
|
| Align Division |
<DIV ALIGN=LEFT|RIGHT|CENTER|JUSTIFY></DIV>
|
| Defined Content |
<SPAN></SPAN> |
|
| Block Quote |
<BLOCKQUOTE></BLOCKQUOTE> |
(usually indented) |
| Quote |
<Q></Q> |
(for short quotations) |
| Citation |
<Q CITE="URL"></Q> |
|
| Emphasis |
<EM></EM> |
(usually displayed as italic) |
| Strong Emphasis |
<STRONG></STRONG> |
(usually displayed as bold) |
| Citation |
<CITE></CITE> |
(usually italics) |
| Code |
<CODE></CODE> |
(for source code listings) |
| Sample Output |
<SAMP></SAMP> |
|
| Keyboard Input |
<KBD></KBD> |
|
| Variable |
<VAR></VAR> |
|
| Definition |
<DFN></DFN> |
(not widely implemented) |
| Author's Address |
<ADDRESS></ADDRESS> |
|
| Large Font Size |
<BIG></BIG> |
|
| Small Font Size |
<SMALL></SMALL> |
|
| Insert |
<INS></INS> |
(marks additions in a new version) |
| Time of Change |
<INS DATETIME=":::"></INS> |
|
| Comments |
<INS CITE="URL"></INS> |
|
| Delete |
<DEL></DEL> |
(marks deletions in a new version) |
| Time of Change |
<DEL DATETIME=":::"></DEL> |
|
| Comments |
<DEL CITE="URL"></DEL> |
|
| Acronym |
<ACRONYM></ACRONYM> |
|
| Abbreviation |
<ABBR></ABBR> |
|
PRESENTATION FORMATTING
|
| Bold |
<B></B> |
|
| Italic |
<I></I> |
|
| Underline |
<U></U> |
(not widely implemented) |
| Strikeout |
<STRIKE></STRIKE> |
(not widely implemented) |
| Strikeout |
<S></S> |
(not widely implemented) |
| Subscript |
<SUB></SUB> |
|
| Superscript |
<SUP></SUP> |
|
| Typewriter |
<TT></TT> |
(displays in a monospaced font) |
| Preformatted |
<PRE></PRE> |
(display text spacing as-is) |
| Width |
<PRE WIDTH=?></PRE> |
(in characters) |
| Center |
<CENTER></CENTER> |
(for both text and images) |
| Blinking |
<BLINK></BLINK> |
(the most derided tag ever) |
| Font Size |
<FONT SIZE=?></FONT> |
(ranges from 1-7) |
| Change Font Size |
<FONT SIZE="+|-?"></FONT> |
| Font Color |
<FONT COLOR="#$$$$$$"></FONT>
|
| Select Font |
<FONT FACE="***"></FONT> |
|
| Point size |
<FONT POINT-SIZE=?></FONT> |
| Weight |
<FONT WEIGHT=?></FONT> |
|
| Base Font Size |
<BASEFONT SIZE=?> |
(from 1-7; default is 3) |
| Marquee |
<MARQUEE></MARQUEE> |
|
POSITIONING
|
| Multi-Column |
<MULTICOL COLS=?></MULTICOL> |
|
| Column Gutter |
<MULTICOL GUTTER=?></MULTICOL> |
| Column Width |
<MULTICOL WIDTH=?></MULTICOL> |
| Spacer |
<SPACER> |
|
| Spacer Type |
<SPACER TYPE=HORIZONTAL|VERTICAL|BLOCK> |
| Size |
<SPACER SIZE=?> |
|
| Dimensions |
<SPACER WIDTH=? HEIGHT=?> |
|
| Alignment |
<SPACER ALIGN=LEFT|RIGHT|CENTER> |
| Layer |
<LAYER></LAYER> |
|
| Name |
<LAYER ID="***"></LAYER> |
|
| Location |
<LAYER LEFT=? TOP=?></LAYER> |
|
| Rel. Position |
<LAYER PAGEX=? PAGEY=?></LAYER> |
| Source File |
<LAYER SRC="***"></LAYER> |
|
| Stacking |
<LAYER Z-INDEX=?></LAYER> |
|
| Stack Position |
<LAYER ABOVE="***" BELOW="***"></LAYER>
|
| Dimensions |
<LAYER HEIGHT=? WIDTH=?></LAYER> |
| Clipping Path |
<LAYER CLIP=,,,></LAYER> |
|
| Visible? |
<LAYER VISIBILITY=SHOW|HIDDEN|INHERIT></LAYER>
|
| Background |
<LAYER BACKGROUND="$$$$$$"></LAYER>
|
| Color |
<LAYER BGCOLOR="$$$$$$"></LAYER>
|
| Inline Layer |
<ILAYER></ILAYER> |
(takes same attributes as LAYER) |
| Alt. Content |
<NOLAYER></NOLAYER> |
|
LINKS, GRAPHICS, AND SOUNDS
|
| Link Something |
<A HREF="URL"></A> |
|
| Link to Location |
<A HREF="URL#***"></A> |
(if in another document) |
| Link to Location |
<A HREF="#***"></A> |
(if in current document) |
| Target Window |
<A HREF="URL" TARGET="***"></A>
|
| Action on Click |
<A HREF="URL" ONCLICK="***"></A>
(Javascript) |
| Mouseover Action |
<A HREF="URL" ONMOUSEOVER="***"></A>
(Javascript) |
| Mouse out Action |
<A HREF="URL" ONMOUSEOUT="***"></A>
(Javascript) |
| Link to Email |
<A HREF="mailto:@"></A> |
|
| Specify Subject |
<A HREF="mailto:@?SUBJECT=***"></A>
(use a real question mark) |
| Define Location |
<A NAME="***"></A> |
|
| Display Image |
<IMG SRC="URL"> |
|
| Alignment |
<IMG SRC="URL" ALIGN=TOP|BOTTOM|MIDDLE|LEFT|RIGHT>
|
| Alignment |
<IMG SRC="URL" ALIGN=TEXTTOP|ABSMIDDLE|BASELINE|ABSBOTTOM>
|
| Alternate |
<IMG SRC="URL" ALT="***">
|
(if image not displayed) |
| Dimensions |
<IMG SRC="URL" WIDTH=? HEIGHT=?> (in
pixels) |
| Dimensions |
<IMG SRC="URL" WIDTH=% HEIGHT=%> (as
percentage of page width/height) |
| Border |
<IMG SRC="URL" BORDER=?> |
(in pixels) |
| Runaround Space |
<IMG SRC="URL" HSPACE=? VSPACE=?>
(in pixels) |
| Low-Res Proxy |
<IMG SRC="URL" LOWSRC="URL">
|
|
| Imagemap |
<IMG SRC="URL" ISMAP> |
(requires a script) |
| Imagemap |
<IMG SRC="URL" USEMAP="URL">
|
|
| Movie Clip |
<IMG DYNSRC="***" START="***"
LOOP=?> |
| Background Sound |
<BGSOUND SRC="***" LOOP=?|INFINITE>
|
| Client-Side Map |
<MAP NAME="***"></MAP> |
(describes the map) |
| Map Section |
<AREA SHAPE="DEFAULT|RECT|CIRCLE|POLY"
COORDS=",,," HREF="URL"|NOHREF> |
| Client Pull |
<META HTTP-EQUIV="Refresh" CONTENT="?;
URL=URL"> |
| Embed Object |
<EMBED SRC="URL"> |
(insert object into page) |
| Object Size |
<EMBED SRC="URL" WIDTH=? HEIGHT=?>
|
| Object |
<OBJECT></OBJECT> |
|
| Parameters |
<PARAM> |
|
DIVIDERS
|
| Paragraph |
<P></P> |
(closing tag often unnecessary) |
| Align Text |
<P ALIGN=LEFT|CENTER|RIGHT></P> |
| Justify Text |
<P ALIGN=JUSTIFY></P> |
|
| Line Break |
<BR> |
(a single carriage return) |
| Clear Textwrap |
<BR CLEAR=LEFT|RIGHT|ALL> |
|
| Horizontal Rule |
<HR> |
|
| Alignment |
<HR ALIGN=LEFT|RIGHT|CENTER> |
| Thickness |
<HR SIZE=?> |
(in pixels) |
| Width |
<HR WIDTH=?> |
(in pixels) |
| Width Percent |
<HR WIDTH="%"> |
(as a percentage of page width) |
| Solid Line |
<HR NOSHADE> |
(without the 3D cutout look) |
| No Break |
<NOBR></NOBR> |
(prevents line breaks) |
| Word Break |
<WBR> |
(where to break a line if needed) |
LISTS
|
| Unordered List |
<UL><LI></UL> |
(before each list item) |
| Compact |
<UL COMPACT></UL> |
|
| Bullet Type |
<UL TYPE=DISC|CIRCLE|SQUARE> |
(for the whole list) |
| Bullet Type |
<LI TYPE=DISC|CIRCLE|SQUARE> |
(this & subsequent) |
| Ordered List |
<OL><LI></OL> |
(before each list item) |
| Compact |
<OL COMPACT></OL> |
|
| Numbering Type |
<OL TYPE=A|a|I|i|1> |
(for the whole list) |
| Numbering Type |
<LI TYPE=A|a|I|i|1> |
(this & subsequent) |
| Starting Number |
<OL START=?> |
(for the whole list) |
| Starting Number |
<LI VALUE=?> |
(this & subsequent) |
| Definition List |
<DL><DT><DD></DL> |
(<DT>=term, <DD>=definition) |
| Compact |
<DL COMPACT></DL> |
|
| Menu List |
<MENU><LI></MENU> |
(before each list item) |
| Compact |
<MENU COMPACT></MENU> |
|
| Directory List |
<DIR><LI></DIR> |
(before each list item) |
| Compact |
<DIR COMPACT></DIR> |
|
BACKGROUNDS AND COLORS
|
|
| Tiled Bkground |
<BODY BACKGROUND="URL"> |
|
|
| Watermark |
<BODY BGPROPERTIES="FIXED"> |
|
| Bkground Color |
<BODY BGCOLOR="#$$$$$$"> |
(order is red/green/blue) |
|
| Text Color |
<BODY TEXT="#$$$$$$"> |
|
|
| Link Color |
<BODY LINK="#$$$$$$"> |
|
|
| Visited Link |
<BODY VLINK="#$$$$$$"> |
|
|
| Active Link |
<BODY ALINK="#$$$$$$"> |
|
|
| (More info at http://werbach.com/web/wwwhelp.html#color) |
SPECIAL CHARACTERS
|
|
| Special Character |
&#?; |
(where ? is the ISO 8859-1 code) |
|
| < |
< |
|
|
| > |
> |
|
|
| & |
& |
|
|
| " |
" |
|
|
| ± |
± |
|
|
| Registered TM |
® |
|
|
| Registered TM |
® |
|
|
| Copyright |
© |
|
|
| Copyright |
© |
|
|
| Non-Breaking Space |
|
|
|
| (Complete list at http://www.htmlhelp.com/reference/charset) |
FORMS
|
| Define Form |
<FORM ACTION="URL" METHOD=GET|POST></FORM>
|
| File Upload |
<FORM ENCTYPE="multipart/form-data"></FORM>
|
| Input Field |
<INPUT TYPE="TEXT|PASSWORD|CHECKBOX|RADIO|
FILE|BUTTON|IMAGE|HIDDEN|SUBMIT|RESET"> |
| Field Name |
<INPUT NAME="***"> |
|
| Field Value |
<INPUT VALUE="***"> |
|
| Checked? |
<INPUT CHECKED> |
(checkboxes and radio boxes) |
| Field Size |
<INPUT SIZE=?> |
(in characters) |
| Max Length |
<INPUT MAXLENGTH=?> |
(in characters) |
| Button |
<BUTTON></BUTTON> |
|
| Button Name |
<BUTTON NAME="***"></BUTTON>
|
|
| Button Type |
<BUTTON TYPE="SUBMIT|RESET|BUTTON"></BUTTON>
|
| Default Value |
<BUTTON VALUE="***"></BUTTON>
|
| Label |
<LABEL></LABEL> |
|
| Item Labelled |
<LABEL FOR="***"></LABEL> |
|
| Selection List |
<SELECT></SELECT> |
|
| Name of List |
<SELECT NAME="***"></SELECT>
|
|
| # of Options |
<SELECT SIZE=?></SELECT> |
|
| Multiple Choice |
<SELECT MULTIPLE> |
(can select more than one) |
| Option |
<OPTION> |
(items that can be selected) |
| Default Option |
<OPTION SELECTED> |
|
| Option Value |
<OPTION VALUE="***"> |
|
| Option Group |
<OPTGROUP LABEL="***"></OPTGROUP>
|
| Input Box Size |
<TEXTAREA ROWS=? COLS=?></TEXTAREA> |
| Name of Box |
<TEXTAREA NAME="***"></TEXTAREA>
|
| Wrap Text |
<TEXTAREA WRAP=OFF|HARD|SOFT></TEXTAREA>
|
| Group elements |
<FIELDSET></FIELDSET> |
|
| Legend |
<LEGEND></LEGEND> |
(caption for fieldsets) |
| Alignment |
<LEGEND ALIGN="TOP|BOTTOM|LEFT|RIGHT"></LEGEND>
|
TABLES
|
| Define Table |
<TABLE></TABLE> |
|
| Table Alignment |
<TABLE ALIGN=LEFT|RIGHT|CENTER> |
| Table Border |
<TABLE BORDER></TABLE> |
(either on or off) |
| Table Border |
<TABLE BORDER=?></TABLE> |
(you can set the value) |
| Cell Spacing |
<TABLE CELLSPACING=?> |
|
| Cell Padding |
<TABLE CELLPADDING=?> |
|
| Desired Width |
<TABLE WIDTH=?> |
(in pixels) |
| Width Percent |
<TABLE WIDTH=%> |
(percentage of page) |
| Table Color |
<TABLE BGCOLOR="$$$$$$"></TABLE>
|
| Table Frame |
<TABLE FRAME=VOID|ABOVE|BELOW|HSIDES|LHS|RHS|
VSIDES|BOX|BORDER></TABLE> |
| Table Rules |
<TABLE RULES=NONE|GROUPS|ROWS|COLS|ALL></TABLE>
|
| Border Color |
<TABLE BORDERCOLOR="$$$$$$"></TABLE>
|
| Dark Border |
<TABLE BORDERCOLORDARK="$$$$$$"></TABLE>
|
| Light Border |
<TABLE BORDERCOLORLIGHT="$$$$$$"></TABLE>
|
| Table Row |
<TR></TR> |
|
| Alignment |
<TR ALIGN=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM> |
| Table Cell |
<TD></TD> |
(must appear within table rows) |
| Alignment |
<TD ALIGN=LEFT|RIGHT|CENTER VALIGN=TOP|MIDDLE|BOTTOM>
|
| No linebreaks |
<TD NOWRAP> |
|
| Columns to Span |
<TD COLSPAN=?> |
|
| Rows to Span |
<TD ROWSPAN=?> |
|
| Desired Width |
<TD WIDTH=?> |
(in pixels) |
| Width Percent |
<TD WIDTH="%"> |
(percentage of table) |
| Cell Color |
<TD BGCOLOR="#$$$$$$"> |
|
| Header Cell |
<TH></TH> |
(same as data, except bold centered) |
| Alignment |
<TH ALIGN=LEFT|RIGHT|CENTER|MIDDLE|BOTTOM> |
| No Linebreaks |
<TH NOWRAP> |
|
| Columns to Span |
<TH COLSPAN=?> |
|
| Rows to Span |
<TH ROWSPAN=?> |
|
| Desired Width |
<TH WIDTH=?> |
(in pixels) |
| Width Percent |
<TH WIDTH="%"> |
(percentage of table) |
| Cell Color |
<TH BGCOLOR="#$$$$$$"> |
|
| Table Body |
<TBODY> |
|
| Table Footer |
<TFOOT></TFOOT> |
(must come before THEAD> |
| Table Header |
<THEAD></THEAD> |
|
| Table Caption |
<CAPTION></CAPTION> |
|
| Alignment |
<CAPTION ALIGN=TOP|BOTTOM|LEFT|RIGHT> |
| Column |
<COL></COL> |
(groups column attributes) |
| Columns Spanned |
<COL SPAN=?></COL> |
|
| Column Width |
<COL WIDTH=?></COL> |
|
| Width Percent |
<COL WIDTH="%"></COL> |
|
| Group columns |
<COLGROUP></COLGROUP> |
(groups column structure) |
| Columns Spanned |
<COLGROUP SPAN=?></COLGROUP> |
|
| Group Width |
<COLGROUP WIDTH=?></COLGROUP> |
| Width Percent |
<COLGROUP WIDTH="%"></COLGROUP>
|
FRAMES
|
| Frame Document |
<FRAMESET></FRAMESET> |
(instead of <BODY>) |
| Row Heights |
<FRAMESET ROWS=,,,></FRAMESET> (pixels
or %) |
| Row Heights |
<FRAMESET ROWS=*></FRAMESET> |
(* = relative size) |
| Column Widths |
<FRAMESET COLS=,,,></FRAMESET> (pixels
or %) |
| Column Widths |
<FRAMESET COLS=*></FRAMESET> |
(* = relative size) |
| Borders |
<FRAMESET FRAMEBORDER="yes|no"></FRAMESET>
|
| Border Width |
<FRAMESET BORDER=?></FRAMESET> |
| Border Color |
<FRAMESET BORDERCOLOR="#$$$$$$"></FRAMESET>
|
| Frame Spacing |
<FRAMESET FRAMESPACING=?></FRAMESET> |
| Define Frame |
<FRAME> |
(contents of an individual frame) |
| Display Document |
<FRAME SRC="URL"> |
| Frame Name |
<FRAME NAME="***"|_blank|_self|_parent|_top>
|
| Margin Width |
<FRAME MARGINWIDTH=?> |
(left and right margins) |
| Margin Height |
<FRAME MARGINHEIGHT=?> |
(top and bottom margins) |
| Scrollbar? |
<FRAME SCROLLING="YES|NO|AUTO"> |
| Not Resizable |
<FRAME NORESIZE> |
|
| Borders |
<FRAME FRAMEBORDER="yes|no"> |
|
| Border Color |
<FRAME BORDERCOLOR="#$$$$$$"> |
| Unframed Content |
<NOFRAMES></NOFRAMES> |
(for non-frames browsers) |
| Inline Frame |
<IFRAME></IFRAME> |
(takes same attributes as FRAME) |
| Dimensions |
<IFRAME WIDTH=? HEIGHT=?></IFRAME> |
| Dimensions |
<IFRAME WIDTH="%" HEIGHT="%"></IFRAME>
|
SCRIPTS AND JAVA
|
| Script |
<SCRIPT></SCRIPT> |
|
| Location |
<SCRIPT SRC="URL"></SCRIPT>
|
| Type |
<SCRIPT TYPE="***"></SCRIPT>
|
| Language |
<SCRIPT LANGUAGE="***"></SCRIPT>
|
| Other Content |
<NOSCRIPT></NOSCRIPT> |
(if scripts not supported) |
| Applet |
<APPLET></APPLET> |
|
| File Name |
<APPLET CODE="***"> |
|
| Parameters |
<APPLET PARAM NAME="***"> |
|
| Location |
<APPLET CODEBASE="URL"> |
|
| Identifier |
<APPLET NAME="***"> |
(for references) |
| Alt Text |
<APPLET ALT="***"> |
(for non-Java browsers) |
| Alignment |
<APPLET ALIGN="LEFT|RIGHT|CENTER">
|
| Size |
<APPLET WIDTH=? HEIGHT=?> |
(in pixels) |
| Spacing |
<APPLET HSPACE=? VSPACE=?> |
(in pixels) |
| Server Script |
<SERVER></SERVER> |
|
MISCELLANEOUS
|
| Comment |
<!-- *** --> |
(not displayed by the browser) |
| Prologue |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
| Searchable |
<ISINDEX> |
(indicates a searchable index) |
| Prompt |
<ISINDEX PROMPT="***"> |
(text to prompt input) |
| Send Search |
<A HREF="URL?***"></a> |
(use a real question mark) |
| URL of This File |
<BASE HREF="URL"> |
(must be in header) |
| Base Window Name |
<BASE TARGET="***"> |
(must be in header) |
| Relationship |
<LINK REV="***" REL="***" HREF="URL">
(in header) |
| Linked File |
<LINK TYPE="***" SRC="***"></LINK>
|
| Meta Information |
<META> |
(must be in header) |
| Style Sheets |
<STYLE></STYLE> |
(implementations vary) |
| Bidirect Off |
<BDO DIR=LTR|RTL></BDO> |
(for certain character sets) |
Copyright ©1995-2001 Kevin
Werbach. This is a compilation of most current HTML codes/tags.
It is based on the original list made by Kevin Werbach, but much of
the contents have been updated. More information is available at http://werbach.com/barebones.
|
|
|
Shipping Policy |
|
Customer Services |
|
Payment Policy |
|
|
Est. Shipping
Cost
Time-in-Transit Map
FAQ - Shipping
Top Reasons for
Delays
UPS,
FedEx,
Postal
Office
Walk-in Sales
APO/FPO Shipping
International
Tracking Orders |
Return Rates
Store Statistics
Customer Satisfaction
Account Applications
Frequent Errors
FAQ-Services
FAQ-Tech Support
Newsletter
Order Status |
Credit Card via Phone
Purchase Order
Prepay, PayPal
Resellers
Corporate
Schools,
Government
Terms & Conditions
Price & Tax
FAQ-Payment
|
|
Top Brands |
|
Abit,
Acer,
AMD, Antec,
AOpen,
Asus,
ATI,
Biostar,
Buffalo,
Cooler Master, Corsair, Creative, Dell, D-Link,
Enermax,
FSP,
Gigabyte,
Hauppauge,
HP,
Intel,
InWin,
Kingston,
Lenovo,
Lian-Li,
Linksys,
Lite-On,
Logisys,
Logitech,
Maxtor,
Microsoft,
MSI,
Mushkin,
Netgear,
OCZ,
Seagate,
Shuttle,
Sony,
SuperMicro,
ThermalTake,
Vantec,
ViewSonic,
Western Digital,
XFX,
Zalman.
|
Have a question about our products, services or technical issues? Find the answer instantly! Type your question or key words in English:
95% email/ phone questions already have answers on our web site.
|
Copyright (c) 1997-2009 Directron.com, Inc., Houston, Texas
Buy -
Sell -
Trade -
Build -
Repair -
Upgrade -
Help -
Troubleshoot -
Shopping
Computers -
Laptops -
Servers -
Hardware -
Parts -
Software -
Peripherals -
Services
High Quality -
Low Prices -
Discount Shop -
Large Selection -
Free Products -
Fast Shipping
Affiliates: Dallas Computer Store - San Antonio Computer Store - K12 Education Computer Systems |
|  |