What is css (cascading style sheets)?

青灯夜游
Release: 2019-05-23 18:16:56
Original
5975 people have browsed it

CSS is the abbreviation of Cascading Style Sheets (Cascading Style Sheets). It is a computer language used to express file styles such as HTML (an application of Standard Generalized Markup Language) or XML (a subset of Standard Generalized Markup Language). .

CSS is mainly used to set the appearance of the website to make our website more gorgeous and eye-catching; it can not only statically modify web pages, but also dynamically coordinate with various script languages. Format various elements of the web page.

CSS can perform pixel-level precise control over the layout of element positions in web pages, supports almost all font size styles, and has the ability to edit web page objects and model styles.

CSS style sheets define the color, size, and position of text and other HTML markup, while HTML files define content and how it is organized. Separating them allows you to change the color scheme without having to rewrite the entire site.

Cascading means that styles applied to the parent element will also be applied to all child elements in the parent element. For example, setting the color of the body text will mean that all headings and paragraphs in the body text will also be the same color.

Specifying and using styles

There are three main ways to include a web page or site style sheet:

1. Set the attribute of the tag, which is called inline style;

2. Use the