What about html and CSS? 2-css

Source: Internet
Author: User

In the previous article, I pulled the HTML stuff and now I want to read CSS,

1. completely separated HTML and CSS

Avoid using the style attribute on the label at any time; move the content in the <style> label to an external CSS file;

2. Select characters, attributes, and values.

Selector {property: Value}

The best unit of the font-size attribute value is em or %, because it has scalability.

3. Font-family font family

Multiple fonts must be separated by commas (,). the browser will search for the listed fonts one by one until the fonts installed on the computer are found. If a font name contains more than one word, double quotation marks are required, as shown in figurefont-family: "Times New Roman".

4, font-size

The font-size attribute can be used for paragraph font control. For titles, you can use titles such as H1 ~ H6

5. Font-weight bold

The common values of the font-weight attribute are bold and normal. Other value browsers are not compatible.

6. Text-decoration font Decoration

Whether to underline the decorative font. Overline-dashes; underline-underline; line-through-dashes; none-none.

7. Text-transform font conversion

Capitalize-upper-case; uppercase-upper-case; lowercase-lower-case; none -...

8. Text spacing

Letter spacing letter-spacing; Word spacing word-spacing; line-height paragraph line height;

Horizontally aligned text-align; text indent text-indent

9. Margin margin, padding, and box model

That is, the border (margin) and padding (padding)

Margin box (boundary box) Border box (border box) padding box (fill white box) element box (element box)

10, border

Border; border-style; border-width; border-color ;...

11. Font

Font:Font-style,Font-variant,Font-weight,Font-size/line-height,Font-family.

Pay attention to the order of attribute values,

Example: P {Font: italic small-caps bold 14px/15px Arial, Helvetica, sans-serif ;}

If some attribute values are left blank, the remaining attribute values must be in the order,

Example: P {Font: bold 14px Arial, sans-serif ;}

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.