Front End Development-css Introduction

Source: Internet
Author: User

Why do we need CSS?

The purpose of using CSS is to make Web pages have beautiful and consistent pages, the other most important reason is that the content and format separation before the CSS, we want to modify the style of HTML elements need to define the style attributes for each HTML element, when the HTML content is very long, it will define a lot of repeating style properties , and the changes need to be modified one by one, with painstaking effort. It's time to make a change, so the CSS is there.

The advent of CSS solves the following two issues:

    1. Separates the contents of an HTML page from the style.
    2. Improve the productivity of web development.
what is CSS?
    • CSS refers to cascading style sheets (cascading style Sheets)
    • Style defines how HTML elements are displayed
    • Styles are typically stored in style sheets
    • Add a style to HTML 4.0 to solve the problem of separating content from performance
    • external style sheets can greatly improve productivity
    • External style sheets are typically stored in CSS files
    • Multiple style definitions can Cascade to a
Advantages of CSS

1. Separation of content and performance

2. Web page performance is unified, easy to modify

3. Rich style, make the page layout more flexible

4. Reduce the amount of Web page code, increase the speed of web browser, save network bandwidth

5. The use of the independent page of CSS, conducive to Web pages indexed by search engines

How do I use CSS?

We usually keep the content of the style rule in a CSS file, which is called an external style sheet, and then the CSS file is referenced in the HTML file by link the tag. The browser loads the CSS file as it resolves to the link tag and renders the HTML file according to the style rules in the file.

Front End Development-css Introduction

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.