4.1 What is a CSS style sheet

Source: Internet
Author: User

In the previous chapter of the course, we learned about forms and the various elements in the form, commonly known as table cells: text box (textbox), Password box (password), radio button (radio), check box (checkbox), list box (<select>< option>), buttons (button, submit, and reset), multi-line text boxes (<textarea>). In addition, the framework is learned, including the basic structure of the framework, how to create multiple complex windows, links between frame windows, and so on.

Starting with this chapter, we'll learn css (cascading style Sheet, cascading style sheets), which focuses on the basic syntax of the style and how to create common style rules (such as creating a non-underlined hyperlink style, setting a thin border text box style, creating common text, color styles, etc.) The difficulty is the use of inline styles, in-line styles, and style sheet files.

Why CSS style sheets are required

By defining a CSS style sheet, you can make your Web pages look and look the same, making them more colorful. A style file can be used for multiple pages, with better ease of use and extensibility, by modifying the style file, can produce the same content, and the appearance of a variety of different pages. In addition, the use of stylesheets can effectively separate the content and appearance of the Web page control, so that the art and programmers of the Division of Labor and Cooperation, to play their respective advantages.

Why CSS stylesheets are needed is primarily based on the following reasons:

(1) The appearance style of HTML tags is relatively single.

When you learn the previous chapters, do you not know? The previous chapters of the page text font, color, size, hyperlink, spacing and other styles are relatively single, in order to compensate for this shortcoming, you need to use CSS style sheet to control HTML tags, so as to achieve more colorful effect.

(2) The style sheet acts like a gorgeous dress.

The same content, with different CSS style files, you can see different layouts and effects. From the artist's point of view, it is easier to adjust the appearance of the page, adjust the text or image of a certain part of the page, so as to achieve a complex and changeable page effect, so the style sheet is equivalent to a page or even a site of gorgeous clothes. 1 shows two pages with the same content and different appearances.


Figure 1 pages with different styles of content

(3) style sheet can realize the separation of content and style, and facilitate team development.

Due to the increasingly fierce competition in today's society, the Division of labor is more and more thin, each person to do more and more single, we develop a website is no exception, often need to work with the design of art and program designers, the designer to do the style, the programmer to write content, in order to meet this need, there appeared a style sheet. Style sheet can be the content structure and format control separation, so that the Web page can only be composed of content, and all the Web page format through the CSS style sheet file to control, so that the art and programmers to facilitate the division of work and cooperation, their respective responsibilities, to do their best to develop a good website provides a strong guarantee.

Click to download the fourth chapter of the case and job resources return to the HTML Getting Started classic tutorial list

Editor: Web Learning Network
This address: http://www.lodidance.com/html/jc/520.html

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.