```
The property is a CSS property, and the value is a CSS value. [S1]
**Background Color**
The CSS `background-color` property defines the background color for an HTML element. Set the background color for the whole page: [S1]
```html
This is a heading
This is a paragraph.
```
Set background color for two different elements: [S1]
```html
This is a heading
This is a paragraph.
```
**Text Color**
The CSS `color` property defines the text color for an HTML element: [S1]
```html
This is a heading
This is a paragraph.
```
**Fonts**
The CSS `font-family` property defines the font to be used for an HTML element: [S1]
```html
This is a heading
This is a paragraph.
```
**Text Size**
The CSS `font-size` property defines the text size for an HTML element: [S1]
```html
This is a heading
This is a paragraph.
```
**Text Alignment**
The CSS `text-align` property defines the horizontal text alignment for an HTML element: [S1]
```html
Centered Heading
Centered paragraph.
```
**Chapter Summary**
- Use the `style` attribute for styling HTML elements. [S1]
- Use `background-color` for background color. [S1]
- Use `color` for text colors. [S1]
- Use `font-family` for text fonts. [S1]
- Use `font-size` for text sizes. [S1]
- Use `text-align` for text alignment. [S1]
## π οΈ μ μ© μ¬λ‘ (Applied in summary)
The examples above demonstrate inline styling applied directly to ``, ``, and `
` elements β the simplest way to color, size, and align content without a separate stylesheet. No external project/commit applications found in the source.
## π» μ½λ ν¨ν΄ (Code patterns)
Style attribute syntax (HTML):
```html
```
Color, font, size, and alignment on a paragraph:
```html
Styled paragraph.
```
Page-wide background color:
```html
```
## βοΈ λͺ¨μ λ° μ
λ°μ΄νΈ (Contradictions & updates)
No contradictions found in the source. (The page teaches inline `style` as the introductory styling mechanism; CSS stylesheets are covered separately.) [S1]
## β
κ²μ¦ μν λ° μ λ’°λ
- **μν:** draft
- **κ²μ¦ λ¨κ³:** conceptual (μ€μ μ μ© μ¬λ‘ λ°κ²¬ μ applied/validatedλ‘ μΉκ²© κ°λ₯)
- **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference, not a primary standards body)
- **μ λ’° μ μ:** 0.90
- **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery)
## π μ§μ κ·Έλν (Knowledge Graph)
- **μμ/루νΈ:** [[HTML Tutorial]]
- **κ΄λ ¨ κ°λ
:** [[HTML Attributes]], [[HTML Formatting]], [[HTML Headings]], [[HTML Basic]]
- **μ°Έμ‘° λ§₯λ½:** Referenced whenever applying inline visual styling (color, font, size, alignment) to elements.
## π μΆμ² (Sources)
- [S1] W3Schools β HTML Styles β https://www.w3schools.com/html/html_styles.asp
## π λ³κ²½ μ΄λ ₯ (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "HTML Styles" page (Astra wiki-curation, P-Reinforce v3.1 format).