Home > Article > Web Front-end > What are css properties
css attributes refer to the content to be changed in the selector, such as font attributes, color attributes, text attributes, etc. The CSS definition rules are composed of three parts, namely selectors and attributes. and attribute values.
The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.
What are css properties?
css (Cascading Style Sheets, cascading style sheets) is a computer language used to express file styles such as HTML or XML. It is a programming language used to express html styles. It can A style language that separates web pages and content.
A cascading style sheet is a complete plain text file, usually used as a separate file with a "css" extension. Its content contains a set of instructions that tell the browser how to arrange and display specific HTML. Rules for content in tags.
CSS definition rules consist of three parts: selectors, attributes and attribute values.
selector { property: value } //选择符 { 属性: 值 }
What are the css attributes?
CSS properties refer to the content to be changed in the selector. Common ones include: font properties, color properties, text properties, etc. Below is a style sheet we defined.
@charset"gb2312"; body { font-family: "宋体"; font-size: 20px; color: #FF0000; } p { font-family: "宋体"; font-size: 30px; color: #FF00ff; }
In this style sheet:
@charset "gb2312"; indicates the use of the Chinese national standard character set.
body and p are two tags in html, and three styles are set for these two tags, namely:
font-family: specify the font of the word type.
font-size: Specifies the size of the font.
color: Specify the color of the font.
font-family, font-size, and color are all CSS properties.
【Recommended learning: css video tutorial】
The above is the detailed content of What are css properties. For more information, please follow other related articles on the PHP Chinese website!