Home > Web Front-end > Front-end Q&A > what is css

what is css

醉折花枝作酒筹
Release: 2023-01-06 11:15:59
Original
5109 people have browsed it

CSS is a cascading style sheet, a computer language used to express file styles such as HTML or XML. It can not only statically modify web pages, but also dynamically format various elements of web pages in conjunction with various scripting languages. CSS provides a style description for the HTML markup language that defines how elements in it are displayed.

what is css

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

css is Cascading Style Sheets (English full name: Cascading Style Sheets), which is a file style used to express HTML (an application of Standard Generalized Markup Language) or XML (a subset of Standard Generalized Markup Language). computer language.

CSS can not only statically modify web pages, but also dynamically format various elements of web pages in conjunction with various scripting languages.

CSS provides a style description for the HTML markup language, defining how elements in it are displayed. CSS is a breakthrough in the field of web design. It can be used to modify a small style to update all page elements related to it.

CSS has the following characteristics:

1. Rich style definition

CSS provides a rich document style appearance, as well as the ability to set text and background attributes; allows for any Elements create borders, as well as the distance between the element border and other elements, and the distance between the element border and the element content; allowing you to change the capitalization, decoration, and other page effects of text at will.

2. Easy to use and modify

CSS can define the style in the style attribute of the HTML element, or in the header part of the HTML document, or you can declare the style in a Special CSS files for reference in HTML pages. In short, CSS style sheets can store and manage all style declarations in a unified manner.

3. Multi-page application

CSS style sheet can be stored in a separate CSS file, so that we can use the same CSS style sheet in multiple pages. Theoretically, CSS style sheets do not belong to any page file and can be referenced in any page file. In this way, the styles of multiple pages can be unified.

4. Cascading

Cascading is to set the same style multiple times on an element, which will use the last attribute value set. For example, if you use the same set of CSS style sheets for multiple pages in a site, and if you want to use other styles for some elements in some pages, you can define a separate style sheet for these styles and apply them to the page.

5. Page compression

In websites that use HTML to define page effects, a large number or repeated tables and font elements are often required to form text styles of various specifications. The consequence of this is that Generates a large number of HTML tags, thereby increasing the page file size.

Putting the style declaration separately in the CSS style sheet can greatly reduce the size of the page, so the time taken to load the page will also be greatly reduced. In addition, the reuse of CSS style sheets reduces the size of the page and reduces the download time.

Recommended learning: css video tutorial

The above is the detailed content of what is css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template