HTML + CSS Study Notes (2)

Source: Internet
Author: User

I. Text alignment
1. Paragraph alignment
<P style = "text-align: Left"> left alignment </P>
<P style = "text-align: Right"> right-aligned </P>
<P style = "text-align: Center"> center alignment </P>
2. Full page settings
<Div> the content here can be set by Div </div>

Ii. HTML list
1. ordered list: numbered indent list
<Ol>
<Li> first line </LI>
<Li> second line </LI>
<Li> Row 3 </LI>
</OL>
2. unordered list: Indent list with project symbols
<Ul>
<Li> first line </LI>
<Li> second line </LI>
<Li> Row 3 </LI>
</Ul>
3. definition list: Indentation list without serial numbers and project symbols
<DL>
<DD> terms to be defined </DD>
<DT> definition </DT>
</Dl>
4. indent
<DL> <DD> indent text </DD> </dl>
<BLOCKQUOTE> indent text </BLOCKQUOTE>
5. List nesting

<Ul> <li> Shaanxi <ul> <li> Xi'an <ul> <li> high-tech Zone </LI> </ul> </Li> </ul>

6. Use the list-style-type style rules in the style in the multilevel list (example)

<Ul> <li> Shaanxi <ul> <li> Xi'an <ul> <li> Yanta district </LI> <li style = "list-style-type: disc "> lianhu district </LI> <li> weiyang district </LI> <li style =" list-style-type: circle "> high-tech Zone </LI> </ul> <ol> <li style =" list-style- type: upper-Roman "> Shaanxi <ol> <li style =" list-style-type: Upper-Alpha "> Xi'an <ol style =" list-style-type: lower-Alpha "> <li> Yanta district </LI> <li> lianhu district </LI> <li style =" list-style-type: decimal "> weiyang district </LI> <li> high-tech Zone </LI> </OL>

3. Text Formatting (example)
1. Bold
<B> B bold </B>
<Strong> strong bold </strong>
Style = "font-weight: bold"
2. Italics
<I> I italic </I>
<Em> em italic </em>
Style = "font-style: italic"
3. Large and small fonts
<Big> big font </big>
<Small> small font </small>
4. Bidding
<Sup> superscript </sup>
<Sub> subscript/sub>
5. Same Width font
<Tt> same width font </tt>
<PRE> equal-width font, reserved space and branch </PRE>
6. Adjust the font
<Font size = "5" color = "Purple"> HTML Settings </font>
<P style = "font-family: verdana, Arial, San-serif, 'times Roman '; font-size: 14pt; color: green "> CSS setting method </P>
Font-family can be set with multiple fonts. The second font is used when the first font is not in the system.
7. special characters

Original HTML code Display result Description
& Lt; < Less than sign or display mark
& Gt; > Greater than sign or display mark
& Amp; & Can be used to display other special characters
& Quot; " Quotation marks
& Reg; Registered
& Copy; Copyright
& Trade; Trademark
& ENSP;   Blank
& Amp; emsp;   Wide white space
& Nbsp;   Blank rows

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.