HTML learning Note 7--css to control the use of some basic properties of text

Source: Internet
Author: User

CSS controls the use of some basic properties of text:

First, the CSS control paragraph:

Paragraph indent: text-indent:20px;

Text direction: Text-align:center;

Text decoration: text-decoration:underline; underline

overline; underline

Line-though; Delete a line

The distance between words and words: letter-spacing:10px;

...... (There are a number of properties that can be found by looking at the manual for more information)

Two, CSS control word size font and color

Color of the font: color:blue; blue

Italic effect: font-style:italic;

Bold effect: Font-weight:bold;

The size of the word: font-size:32px;

Row height: line-height:46px;

Font: font-family: "Simhei"; blackbody

......

Some properties can be written together, such as the above 5 properties, but need to be written in order, and the size of the word and the line height of the two items to be separated by "/", such as:

{font:italic bold 32px/46px "Simhei"}

Three, CSS font settings tips

1. About fonts: There are two major categories (lined and sans serif)

Example: newspaper or news headlines, generally used in boldface/Microsoft Jas: The corner of the word and the Strokes are flat, called "sans serif" Font (English: sans-serif) ;

And the body part is the use of the song Body/new song body: is a "lined" font (English: serif ) ;

        

2. The font that is set by the designer may not be supported by the user's browser (the font is not installed), and the client displays the default font for its browser.

At this point, the better solution is: Under the Font-family property, write multiple font settings, and the less common, more special fonts in front, relatively common in the back, separated by commas, for example:

{

font-family: "Xu Jinglei font", "Microsoft Jas Black", "blackbody", Sans-serif;

}

Note: Sans-serif is not a specific font, in cases where the previous fonts are not supported, tell the browser to display a supported "sans serif" font display;

Also, is haha, check manual ~

HTML learning Note 7--css to control the use of some basic properties of text

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.