01. CSS Index
November 5, 2023Less than 1 minute
HTML parts
The html page could be seperated into 3 parts
- Structure [HTML]
- Style [CSS]
- Behavior [Javascript]
Style Classification
- Inline CSS
Drawbacks- only influence one element
- maintenance costs are very high
<p style="color:red; font-size: 60px">This is inline style</p>
- Internal or embedded CSS
The style could write into head block
Darwbacks- Only valid for a sigle page
<style> p { color:red; font-size: 30px } </style>
- External CSS
Using link tag to involve external CSS file.
Advantage- Could reuse for multi pages.
- Browser caching mechanism can be used.
<link rel="stylesheet" href="style.css">