CSS Color Property
Predict Output Beginner
Question
What color is the text?
Code
<p style="color: blue;">Hi</p>
Hint
The style attribute applies CSS directly.
Explanation
The inline style color: blue makes the text blue. Inline styles have the highest specificity, overriding any external or internal CSS. The paragraph renders "Hi" in blue text. This is the simplest way to apply CSS but should be used sparingly for maintainability.
Related Resources
Related Lessons
- CSS
Learn CSS styling.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.