Needs To U

Thursday, February 17, 2011

HTML TAGS QUICK GUIDE


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
< 
&lt; or &#60;
> 
&gt; or &#62;

&
&amp; or &#38;

é
&eacute; or &#233;

Non-Breaking Space
&nbsp; or &#160;


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
&
&#38;
&amp;
Ampersand
< 
&#60;
&lt;
Less than
> 
&#62;
&gt;
Greater than

&#128; through &#159; are codes that should not be used (illegal Unicode)

&#160;
&nbsp;
Non-breaking Space
¡
&#161;
&iexcl;
Inverted exclamation
¢
&#162;
&cent;
Cent sign
£
&#163;
&pound;
Pound sterling
¤
&#164;
&curren;
General currency sign
¥
&#165;
&yen;
Yen sign
¦
&#166;
&brvbar;
Broken vertical bar
§
&#167;
&sect;
Section sign
¨
&#168;
&uml;
Umlaut (dieresis)
©
&#169;
&copy;
Copyright
ª
&#170;
&ordf;
Feminine ordinal
«
&#171;
&laquo;
Left angle quote, guillemotleft
¬
&#172;
&not;
Not sign
&#173;
&shy;
Soft hyphen
®
&#174;
&reg;
Registered trademark
¯
&#175;
&macr;
Macron accent
°
&#176;
&deg;
Degree sign
±
&#177;
&plusmn;
Plus or minus
²
&#178;
&sup2;
Superscript two
³
&#179;
&sup3;
Superscript three
´
&#180;
&acute;
Acute accent
µ
&#181;
&micro;
Micro sign
&#182;
&para;
Paragraph sign
·
&#183;
&middot;
Middle dot
¸
&#184;
&cedil;
Cedilla
¹
&#185;
&sup1;
Superscript one
º
&#186;
&ordm;
Masculine ordinal
»
&#187;
&raquo;
Right angle quote, guillemotright
¼
&#188;
&frac14;
Fraction one-fourth
½
&#189;
&frac12;
Fraction one-half
¾
&#190;
&frac34;
Fraction three-fourths
¿
&#191;
&iquest;
Inverted question mark
À
&#192;
&Agrave;
Capital A, grave accent
Á
&#193;
&Aacute
Capital A, acute accent
Â
&#194;
&Acirc;
Capital A, circumflex accent
Ã
&#195;
&Atilde;
Capital A, tilde
Ä
&#196;
&Auml;
Capital A, dieresis or umlaut mark
Å
&#197;
&Aring;
Capital A, ring
Æ
&#198;
&AElig;
Capital AE dipthong (ligature)
Ç
&#199;
&Ccedil;
Capital C, cedilla
È
&#200;
&Egrave;
Capital E, grave accent
É
&#201;
&Eacute;
Capital E, acute accent
Ê
&#202;
&Ecirc;
Capital E, circumflex accent
Ë
&#203;
&Euml;
Capital E, dieresis or umlaut mark
Ì
&#204;
&Igrave;
Capital I, grave accent
Í
&#205;
&Iacute;
Capital I, acute accent
Î
&#206;
&Icirc;
Capital I, circumflex accent
Ï
&#207;
&Iuml;
Capital I, dieresis or umlaut mark
Ð
&#208;
&ETH;
Capital Eth, Icelandic
Ñ
&#209;
&Ntilde;
Capital N, tilde
Ò
&#210;
&Ograve;
Capital O, grave accent
Ó
&#211;
&Oacute;
Capital O, acute accent
Ô
&#212;
&Ocirc;
Capital O, circumflex accent
Õ
&#213;
&Otilde;
Capital O, tilde
Ö
&#214;
&Ouml;
Capital O, dieresis or umlaut mark
×
&#215;
&times;
Multiply sign
Ø
&#216;
&Oslash;
Capital O, slash
Ù
&#217;
&Ugrave;
Capital U, grave accent
Ú
&#218;
&Uacute;
Capital U, acute accent
Û
&#219;
&Ucirc;
Capital U, circumflex accent
Ü
&#220;
&Uuml;
Capital U, dieresis or umlaut mark
Ý
&#221;
&yacute;
Capital Y, acute accent
Þ
&#222;
&THORN;
Capital THORN, Icelandic
ß
&#223;
&szlig;
Small sharp s, German (sz ligature)
à
&#224;
&agrave;
Small a, grave accent
á
&#225;
&aacute;
Small a, acute accent
â
&#226;
&acirc;
Small a, circumflex accent
ã
&#227;
&atilde;
Small a, tilde
ä
&#228;
&aamul;
Small a, dieresis or umlaut mark
å
&#229;
&aring
Small a, ring
æ
&#230;
&aelig;
Small ae dipthong (ligature)
ç
&#231;
&ccedil;
Small c, cedilla
è
&#232;
&egrave;
Small e, grave accent
é
&#233;
&eacute;
Small e, acute accent
ê
&#234;
&ecirc;
Small e, circumflex accent
ë
&#235;
&euml;
Small e, dieresis or umlaut mark
ì
&#236;
&igrave;
Small i, grave accent
í
&#237;
&iacute;
Small i, acute accent
î
&#238;
&icirc;
Small i, circumflex accent
ï
&#239;
&iuml;
Small i, dieresis or umlaut mark
ð
&#240;
&eth;
Small eth, Icelandic
ñ
&#241;
&ntilde;
Small n, tilde
ò
&#242;
&ograve;
Small o, grave accent
ó
&#243;
&oacute;
Small o, acute accent
ô
&#244;
&ocirc;
Small o, circumflex accent
õ
&#245;
&otilde;
Small o, tilde
ö
&#246;
&ouml;
Small o, dieresis or umlaut mark
÷
&#247;
&divide;
Division sign
ø
&#248;
&oslash;
Small o, slash
ù
&#249;
&ugrave;
Small u, grave accent
ú
&#250;
&uacute;
Small u, acute accent
û
&#251;
&ucirc;
Small u, circumflex accent
ü
&#252;
&uuml;
Small u, dieresis or umlaut mark
ý
&#253;
&yacute;
Small y, acute accent
þ
&#254;
&thorn;
Small thorn, Icelandic
ÿ
&#255;
&yuml;
Small y, dieresis or umlaut mark
˜
&#732;
&tilde;
Tilde
&#8211;
&ndash;
Endash
&#8212;
&mdash;
Emdash
&#8216;
&lsquo;
Left Single Quote
&#8217;
&rsquo;
Right Single Quote
&#8220;
&ldquo;
Left Double Quote
&#8221;
&rdquo;
Right Double Quote
&#8364;
&euro;
Euro
&#8482;
&trade;
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
One of the most common design mistakes is substituting inch and foot marks for quotation marks and apostrophes. This is especially true for the web as it seems many web designers have little background in typography. But it’s not their fault really, the keyboard is designed to type foot marks and inch marks, not the real typographic characters!
However, you CAN get real quotes and apostrophes quite easily—just use the keyboard equivalents listed below. These keyboard equivalents (for PC and Mac) work in any program—Dreamweaver, Flash, Photoshop, Fireworks, etc.

COMMON MISTAKE
CORRECT
PC KEYSTROKE
MAC KEYSTROKE
HTML CODE
EXPLANATION
foot mark
(or dumb apostrophe)

Description: http://www.nobledesktop.com/img/propertpye/footmark_white.gif
smart apostrophe


Description: http://www.nobledesktop.com/img/propertpye/apostraphe_white.gif
Alt 0146
(hold Alt while typing numbers on keypad, then releaseAlt)
Option-Shift-]
&#8217;
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)

Description: http://www.nobledesktop.com/img/propertpye/inchmark_grey.gif
smart quotation


Description: http://www.nobledesktop.com/img/propertpye/quotationmark_grey.gif
Alt 0147
(for left quote)
Alt 0148
(for right quote)
Option-[
(for left quote)
Option-Shift-[
(for right quote)
&#8220;
(left)
&#8221;
(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

Description: http://www.nobledesktop.com/img/propertpye/dash_white.gif
endash

Description: http://www.nobledesktop.com/img/propertpye/endash_white.gif
Alt 0150
Option-Hyphen
&#8211;
The endash is used to signify a “through” relationship, as in marking dates such as Monday through Friday, i.e. Monday–Friday.
two dashes

Description: http://www.nobledesktop.com/img/propertpye/twodashes_grey.gif
emdash

Description: http://www.nobledesktop.com/img/propertpye/emdash_grey.gif
Alt 0151
Option-Shift-
Hyphen
&#8212;
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).

1 comment:

  1. To Download This Use This Link::

    http://www.ziddu.com/download/13840328/QuickGuidetoHTMLTags.docx.html

    ReplyDelete