CSS writing methods include: selecting HTML elements with syntax selectors, setting attributes and values, and forming CSS declarations. Organizational forms include style sheets, style blocks, and inline styles. Selector types include element, class, ID, and wildcard selectors. Examples of common properties are color, font, size, background color, and alignment.
CSS code writing method
1. Writing syntax
2. Syntax of CSS declaration:
<code>选择器 {属性: 值; 属性: 值; ...}</code>
3. Organization of CSS rules: