css is a programming language used to represent HTML styles, and is mainly used to design the style of web pages. There are three types of CSS: 1. Inline style, which uses the style attribute to write the style at the beginning of the tag; 2. Internal style (inline style); 3. External style, which is written in the CSS file.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
What is css?
css full name is Cascading Style Sheets, which means "Cascading Style Sheets" in Chinese. It is an application used to express HTML (Standard Generalized Markup Language) or XML (Standard Generalized Markup Language) (a subset of) and other file-style computer languages. It is a programming language used to express HTML styles. It is a style language that can separate web pages and content.
CSS is mainly used to design the style of web pages and beautify web pages; it can not only statically modify web pages, but also dynamically format various elements of web pages in conjunction with various scripting languages.
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.
What are the types of css?
CSS styles mainly include the following three types:
1. Inline style (embedded style):
structure inside, that is, the style written inside the tag; written inside the beginning part of the tag, in the style attribute.
Example:
<标记 style="样式的属性名1:样式的属性值1;属性名2:属性值2;......"></标记>
2. Internal style (inline style):
is written inside the HTML page, stored in the head tag, and the style is written in style within the mark.
Example:
<style> 选择器 {属性名:属性值;属性名:属性值;......} </style>
3. External style (external style): written in css file.
Example:
You can use the tag to introduce it into the HTML page.
<link type="text/css" rel="stylesheet" href="css/main.css" />
For more programming-related knowledge, please visit: Programming Video! !
The above is the detailed content of What is css? What types are there?. For more information, please follow other related articles on the PHP Chinese website!