掌握CSS:轻松入门基础英文术语指南

Introduction
Cascading Style Sheets (CSS) is a powerful tool used to style and design web pages. Whether you’re a beginner or looking to refresh your knowledge, understanding the basic English terminology used in CSS is essential. This guide will help you navigate through the fundamental terms you’ll encounter when learning CSS.
Basic Terminology
1.
Cascading Style Sheets (CSS)
Definition
: A stylesheet language used to describe the presentation of a document written in HTML or XML.
Usage
: It controls the layout of various web documents, from simple text pages to complex web applications.
2.
Selector
Definition
: A pattern used to select the element(s) on which to apply styles.
Usage
: Selectors can be tags, classes, IDs, attributes, or pseudo-classes.
3.
Declaration
Definition
: A rule that consists of a property and a value.
Usage
: It defines the style for a selected element, such as
color: red;
or
font-size: 14px;
.
4.
Property
Definition
: A CSS property is a name that describes a style setting.
Usage
: Examples include
color
,
font-size
,
margin
, and
padding
.
5.
Value
Definition
: The value of a CSS property specifies how the property should be applied.
Usage
: Values can be colors, lengths, percentages, or keywords, such as
red
,
10px
, or
bold
.
6.
Declaration Block
Definition
: A block of CSS code enclosed in curly braces
{}
.
Usage
: It contains one or more declarations for a single selector.
7.
Selector Group
Definition
: A comma-separated list of selectors that apply the same style to multiple elements.
Usage
:
h1, h2, h3 { color: blue; }
applies the blue color to all
h1
,
h2
, and
h3
elements.
8.
Nested Rules
Definition
: CSS rules that are defined within another rule.
Usage
: Used to create a parent-child relationship between elements, such as
div#container p { color: green; }
.
9.
Inline Styles
Definition
: CSS styles applied directly to an HTML element using the
style
attribute.
Usage
:
style=”color: red; font-size: 12px;”
applies red text and a 12px font size to the element.
10.
External Stylesheet
Definition
: A CSS file linked to an HTML document using the tag in the

section.
Usage
: Allows you to separate content from presentation and apply styles across multiple pages.
11.
Internal Stylesheet
Definition
: CSS code placed within the