What is css? What types are there?

青灯夜游
Release: 2021-11-18 16:20:42
Original
10539 people have browsed it

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.

What is css? What types are there?

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;......"></标记>
Copy after login

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>
Copy after login

3. External style (external style): written in css file.

Example:

What is css? What types are there?

You can use the tag to introduce it into the HTML page.

<link type="text/css" rel="stylesheet" href="css/main.css" />
Copy after login

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!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!