HTML的font属性

ypeChoicefunction
Physical styles <B> Make text bold.
<I> Make text italic.
<U> Make text underline.
<Strike> Make text strikethrough.
<Sup> Make text superscript.
<Sub> Make text subscript.
Teletype Make text teletype.
Logical styles <Strong> Indicate the text is very important.
<Em> Indicate the text is important.
<Cite> Indicate that the text is from a book or other document.
<Address> Indicate that the text is an address.
<Dfn> Indicate that the text is a definition.
<Samp> Indicate that the text is a sequence of literal characters.
Keyboard Indicate that the text is keyboard input.
<Var> Indicate that the text is a variable.
<Code> Indicate that the text is code.

Font Choice Function
Face Default Make text display in the default font (Times New Roman) of the Web browser.
Family Type a list of fonts separated by commas (for example, Helvetica, Arial, Courier). The text will display in the first listed font found on the browser's system.
(Font name) Make the text display in the font specified. (If the font is not available on the browser's system, another font will be substituted.)
Size 1 through 7 (3 is the default) Format text with 7 sizes where 7 is the largest size and 1 is the smallest.
Increase Format text with the largest size (same as 7).
Decrease Format text with the smallest size (same as 1).
Color "#xxxxxx" or: White, Red, Blue and Others Make the text a different color.


The tags below have the effect shown on the text in between.

 Collapse
 <U>underlined text</U>
<B>bold text</B>
<I>Italicized text</I>
<BIG>Big text</BIG>
<SMALL>small text</SMALL>
<TT>Monospaced typewriter text</TT>
<BLINK>blink</BLINK>
(Note: This only works on Netscape)
<SUB>This makes a subscript.</SUB>
<SUP>This makes a superscript.</SUP>
<STRIKE>strikeout</STRKE>
<FONT FACE="Arial">This is a test</FONT>
<FONT COLOR="#00FF00">Text is in the color of Green</FONT>
<FONT SIZE="+2">This is a test</FONT>

There are three kinds of lists in HTML:

 Collapse
     Unordered lists <UL></UL>
     Ordered lists <OL></OL>     
     Definition lists <DL></DL>

Unordered Lists

This list starts with an opening list <UL> tag and ends the list with a closing list </UL> tag. Between the <UL> and </UL>, you enter the <LI> (list item) tag followed by the individual item; no closing </LI> tag is needed. For example:

 Collapse
     <UL>
     <LI> Name
     <LI> Phone
     <LI> ID
     </UL>

In the web browser the above code would appear three elements as:

    • Name
    • Phone
    • ID

Ordered Lists

An orderered list is similar to an unordered list, except it uses <OL> instead of <UL>:

 Collapse
     <OL>
     <LI>College
     <LI>Hight School
     <LI>Elemantory School
     </OL>

The output is:

    1. College
    2. Hight School
    3. Elemantory School

Definition Lists

A definition list starts with <DL> and ends with </DL>. This list consists of alternating a definition term and a definition definition. The definition term is enclosed in <DT> </DT> and should precede the definition definition. The definition definition is enclosed in <DD> </DD>. So, a whole definition list looks like:

 Collapse
 
     <DL>
     <DT> term </DT>
     <DD> definition </DD>
      ...
     <DT> term </DT>
     <DD> definition </DD>
     </DL>
posted @ 2009-11-07 08:19  Sum_yang  阅读(19812)  评论(0编辑  收藏  举报