Quick Guide to HTML Tags
REQUIRED TAGS | ||
Document Tag | <html></html> | Top and bottom of doc |
Head Section | <head></head> | Gotta have at top of doc (after <html>) |
Title | <title></title> | Goes in the Head Section |
Body Section | <body></body> | Sandwiches the body of page |
HEADING AND TEXT FORMATTING | ||
Heading | <h?></h?> | H1 thru H6 (largest thru smallest) |
Bold | <b></b> or <strong></strong> | This is bold |
Italic | <i></i> or <em></em> | This is italic |
Typewriter | <tt></tt> | Monospaced font |
Center | <div align="center" ></div> | Centered |
Subscript | <sub></sub> | H2O |
Superscript | <sup></sup> | E=mc2 |
Font Size | <font size="?"></font> | 1 to 7 (smallest to largest) |
ALIGNMENT / SPACING | ||
Align Left | align="left" | Alignment works with text, graphics, headings, tables, paragraphs |
Align Center | align="center" | |
Align Right | align="right" | |
Paragraph | <p></p> | Gives space before a paragraph |
Line Break | <br> | New line or carriage return |
Block Quote | <blockquote></blockquote> | Indents a block of text |
GRAPHICS | ||
Display graphic | <img src="img/name.xxx"> | .xxx = .gif or .jpg |
Dimensions | <img src="img/name.xxx" width="?" height="?"> | Scale graphic (in pixels) |
Border | <img src="img/url" border="?"> | Make border 0 if linked and you still wish no border |
HORIZONTAL RULES | ||
Horizontal Rule | <hr> | Shaded rule across page |
HR Thickness | <hr size="?"> | Thickness of rule in pixels |
HR Width | <hr width="?"> | Width of rule in pixels |
HR Width Percent | <hr width="?%"> | Percentage of page width |
Solid Line | <hr noshade> | Eliminates shading |
LISTS | ||
Unordered List | <ul> <li></li> </ul> | Put <li> around each list item |
Bullet List | <ul type="disc"> | Bullet in front of each entry in list |
Circle Bullets | <ul type="circle"> | Circle in front of each entry in list |
Square Bullets | <ul type="square"> | Square in front of each entry in list |
Ordered List | <ol> <li></li> </ol> | Numbers the list items |
Definition List | <dl> <dt></dt> <dd></dd> </dl> | DT=Data Term, DD=Data Definition |
BACKGROUNDS & COLOR | ||
Tiled Background | <body background= "filename.xxx"> | .xxx = .gif or .jpg |
Background Color | <body bgcolor="#$$$$$$"> | $ represents hexadecimal code |
Text Color | <body text="#$$$$$$"> | $ represents hexadecimal code |
Link Color | <body link="#$$$$$$"> | $ represents hexadecimal code |
Visited Link | <body vlink="#$$$$$$"> | $ represents hexadecimal code |
Active Link | <body alink="#$$$$$$"> | $ represents hexadecimal code |
The 6 digits used for background color and any other color specification are hexadecimal code. The best way to find out the hexadecimal code for the color you want is to use the color palette from any of the HTML editors out there, including Homesite, BBEdit, Dreamweaver, or go into Photoshop and Fireworks. Select the color you want and then look for the Hexadecimal code in the Info palette of the program you are using. |
LINKS | ||
Link to another page | <a href="page.html"></a> | Link to another page in your site |
Link to another site | <a href="url"></a> | Requires full address; e.g. "http://www.yahoo.com" |
Link to target in page | <a href="#name"></a> | Moves to another location in current page |
Link to target in other site | <a href="url#name"></a> | Links to specific location in page outside your site |
Define target in document | <a name="name"></a> | Put just above where you want page to display |
Use graphic as link | <img src="img/name.xxx"> | Embed this code in <a href="?"> tag |
Alternate name | <img src="img/url" alt="xxx"> | xxx = Description of graphic |
SPECIAL CHARACTERS | ||
Special Character | &name; or &#?; | ? is numeric ASCII code |
< | < or < | |
> | > or > | |
& | & or & | |
é | é or é | |
Non-Breaking Space | or   |
TABLES | ||
Define Table | <table></table> | Sandwiches table |
Desired Width | <table width="?"> | In pixels |
Width Percent | <table width="?%"> | Percentage |
Table Border | <table border="?"> | In pixels |
Table Cell | <td></td> | Think of it as Table Data |
Table Row | <tr></tr> | New Table Row |
Cell Spacing | <table cellspacing="?"> | In pixels |
Cell Padding | <table cellpadding="?"> | In pixels |
Row Horiz. Alignment | <tr align="left,center,right"> | |
Row Vert. Alignment | <tr valign="top,middle,bottom"> | |
Data Horiz. Alignment | <td align="left,center,right"> | |
Data Vert. Alignment | <td valign="top,middle,bottom"> | |
Columns to Span | <td colspan="?"> | For data to stretch across columns |
Rows to Span | <td rowspan="?"> | For data to go deeper than one column |
Desired Width | <td width="?"> | In pixels |
Table Header | <th></th> | Bold, centered table data |
Table Caption | <caption></caption> |
HTML Special Characters |
CHARACTER | NUMERIC CODE | NAME CODE | DESCRIPTION | |||
& | & | & | Ampersand | |||
< | < | < | Less than | |||
> | > | > | Greater than | |||
€ through Ÿ are codes that should not be used (illegal Unicode) | ||||||
  | | Non-breaking Space | ||||
¡ | ¡ | ¡ | Inverted exclamation | |||
¢ | ¢ | ¢ | Cent sign | |||
£ | £ | £ | Pound sterling | |||
¤ | ¤ | ¤ | General currency sign | |||
¥ | ¥ | ¥ | Yen sign | |||
¦ | ¦ | ¦ | Broken vertical bar | |||
§ | § | § | Section sign | |||
¨ | ¨ | ¨ | Umlaut (dieresis) | |||
© | © | © | Copyright | |||
ª | ª | ª | Feminine ordinal | |||
« | « | « | Left angle quote, guillemotleft | |||
¬ | ¬ | ¬ | Not sign | |||
­ | ­ | Soft hyphen | ||||
® | ® | ® | Registered trademark | |||
¯ | ¯ | ¯ | Macron accent | |||
° | ° | ° | Degree sign | |||
± | ± | ± | Plus or minus | |||
² | ² | ² | Superscript two | |||
³ | ³ | ³ | Superscript three | |||
´ | ´ | ´ | Acute accent | |||
µ | µ | µ | Micro sign | |||
¶ | ¶ | ¶ | Paragraph sign | |||
· | · | · | Middle dot | |||
¸ | ¸ | ¸ | Cedilla | |||
¹ | ¹ | ¹ | Superscript one | |||
º | º | º | Masculine ordinal | |||
» | » | » | Right angle quote, guillemotright | |||
¼ | ¼ | ¼ | Fraction one-fourth | |||
½ | ½ | ½ | Fraction one-half | |||
¾ | ¾ | ¾ | Fraction three-fourths | |||
¿ | ¿ | ¿ | Inverted question mark | |||
À | À | À | Capital A, grave accent | |||
Á | Á | Á | Capital A, acute accent | |||
 |  |  | Capital A, circumflex accent | |||
à | à | à | Capital A, tilde | |||
Ä | Ä | Ä | Capital A, dieresis or umlaut mark | |||
Å | Å | Å | Capital A, ring | |||
Æ | Æ | Æ | Capital AE dipthong (ligature) | |||
Ç | Ç | Ç | Capital C, cedilla | |||
È | È | È | Capital E, grave accent | |||
É | É | É | Capital E, acute accent | |||
Ê | Ê | Ê | Capital E, circumflex accent | |||
Ë | Ë | Ë | Capital E, dieresis or umlaut mark | |||
Ì | Ì | Ì | Capital I, grave accent | |||
Í | Í | Í | Capital I, acute accent | |||
Î | Î | Î | Capital I, circumflex accent | |||
Ï | Ï | Ï | Capital I, dieresis or umlaut mark | |||
Ð | Ð | Ð | Capital Eth, Icelandic | |||
Ñ | Ñ | Ñ | Capital N, tilde | |||
Ò | Ò | Ò | Capital O, grave accent | |||
Ó | Ó | Ó | Capital O, acute accent | |||
Ô | Ô | Ô | Capital O, circumflex accent | |||
Õ | Õ | Õ | Capital O, tilde | |||
Ö | Ö | Ö | Capital O, dieresis or umlaut mark | |||
× | × | × | Multiply sign | |||
Ø | Ø | Ø | Capital O, slash | |||
Ù | Ù | Ù | Capital U, grave accent | |||
Ú | Ú | Ú | Capital U, acute accent | |||
Û | Û | Û | Capital U, circumflex accent | |||
Ü | Ü | Ü | Capital U, dieresis or umlaut mark | |||
Ý | Ý | ý | Capital Y, acute accent | |||
Þ | Þ | Þ | Capital THORN, Icelandic | |||
ß | ß | ß | Small sharp s, German (sz ligature) | |||
à | à | à | Small a, grave accent | |||
á | á | á | Small a, acute accent | |||
â | â | â | Small a, circumflex accent | |||
ã | ã | ã | Small a, tilde | |||
ä | ä | &aamul; | Small a, dieresis or umlaut mark | |||
å | å | å | Small a, ring | |||
æ | æ | æ | Small ae dipthong (ligature) | |||
ç | ç | ç | Small c, cedilla | |||
è | è | è | Small e, grave accent | |||
é | é | é | Small e, acute accent | |||
ê | ê | ê | Small e, circumflex accent | |||
ë | ë | ë | Small e, dieresis or umlaut mark | |||
ì | ì | ì | Small i, grave accent | |||
í | í | í | Small i, acute accent | |||
î | î | î | Small i, circumflex accent | |||
ï | ï | ï | Small i, dieresis or umlaut mark | |||
ð | ð | ð | Small eth, Icelandic | |||
ñ | ñ | ñ | Small n, tilde | |||
ò | ò | ò | Small o, grave accent | |||
ó | ó | ó | Small o, acute accent | |||
ô | ô | ô | Small o, circumflex accent | |||
õ | õ | õ | Small o, tilde | |||
ö | ö | ö | Small o, dieresis or umlaut mark | |||
÷ | ÷ | ÷ | Division sign | |||
ø | ø | ø | Small o, slash | |||
ù | ù | ù | Small u, grave accent | |||
ú | ú | ú | Small u, acute accent | |||
û | û | û | Small u, circumflex accent | |||
ü | ü | ü | Small u, dieresis or umlaut mark | |||
ý | ý | ý | Small y, acute accent | |||
þ | þ | þ | Small thorn, Icelandic | |||
ÿ | ÿ | ÿ | Small y, dieresis or umlaut mark | |||
˜ | ˜ | ˜ | Tilde | |||
– | – | – | Endash | |||
— | — | — | Emdash | |||
‘ | ‘ | ‘ | Left Single Quote | |||
’ | ’ | ’ | Right Single Quote | |||
“ | “ | “ | Left Double Quote | |||
” | ” | ” | Right Double Quote | |||
€ | € | € | Euro | |||
™ | ™ | ™ | Trade mark | |||
NOTE: Some older browsers may not always render characters properly. Netscape 4 for instance sometimes will improperly display a named code, while it will display the numbered code correctly. Be sure to test to make sure codes display properly in the desired browsers. | ||||||
TYPOGRAPHICALLY CORRECT
| ||||||
COMMON MISTAKE | CORRECT | PC KEYSTROKE | MAC KEYSTROKE | HTML CODE | EXPLANATION |
foot mark (or dumb apostrophe) | smart apostrophe | Alt 0146 (hold Alt while typing numbers on keypad, then releaseAlt) | Option-Shift-] | ’ | Wherever you see a single quote or apostrophe, a curly or “smart” apostrophe should be used. Most of the world uses the footmark because that is what is on the keyboard. |
inch mark (or dumb quote) | smart quotation | Alt 0147 (for left quote) Alt 0148 (for right quote) | Option-[ (for left quote) Option-Shift-[ (for right quote) | “ (left) ” (right) | Quotation marks are usually replaced by inch marks simply because the typist doesn’t know there is a difference. There is! |
dash or hyphen | endash | Alt 0150 | Option-Hyphen | – | The endash is used to signify a “through” relationship, as in marking dates such as Monday through Friday, i.e. Monday–Friday. |
two dashes | emdash | Alt 0151 | Option-Shift- Hyphen | — | The emdash is used instead of two dashes where someone wants to indicate a pause, or to separate a clause in a sentence—like this—from the rest of the sentence. It is similar to a parenthetical phrases (such as this). |
To Download This Use This Link::
ReplyDeletehttp://www.ziddu.com/download/13840328/QuickGuidetoHTMLTags.docx.html