Improved change the color using CSS guide article (#34284)
* Update index.md * Update index.md
This commit is contained in:
committed by
Randell Dawson
parent
e3ee778c07
commit
dd9566e96e
@ -1,19 +1,53 @@
|
||||
---
|
||||
title: Change the Color of Text
|
||||
---
|
||||
|
||||
 Remember to use <a>**`Read-Search-Ask`**</a> if you get stuck. Try to pair program  and write your own code 
|
||||
|
||||
## Change the Color of Text
|
||||
|
||||
You can change the color of text in CSS using the `color` property.
|
||||
##  Hint: 1
|
||||
|
||||
### EXAMPLE
|
||||
The color of text can be changed using the CSS `color` property.
|
||||
|
||||
```
|
||||
color: red;
|
||||
```
|
||||
> _try to solve the problem now_
|
||||
|
||||
## SOLUTION
|
||||
## Spoiler Alert!
|
||||
|
||||
```
|
||||

|
||||
|
||||
**Solution ahead!**
|
||||
|
||||
```html
|
||||
<h2 style="color: red;">CatPhotoApp</h2>
|
||||
<main>
|
||||
<p>Click here to view more <a href="#">cat photos</a>.</p>
|
||||
|
||||
<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>
|
||||
|
||||
<div>
|
||||
<p>Things cats love:</p>
|
||||
<ul>
|
||||
<li>cat nip</li>
|
||||
<li>laser pointers</li>
|
||||
<li>lasagna</li>
|
||||
</ul>
|
||||
<p>Top 3 things cats hate:</p>
|
||||
<ol>
|
||||
<li>flea treatment</li>
|
||||
<li>thunder</li>
|
||||
<li>other cats</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<form action="/submit-cat-photo">
|
||||
<label><input type="radio" name="indoor-outdoor" checked> Indoor</label>
|
||||
<label><input type="radio" name="indoor-outdoor"> Outdoor</label><br>
|
||||
<label><input type="checkbox" name="personality" checked> Loving</label>
|
||||
<label><input type="checkbox" name="personality"> Lazy</label>
|
||||
<label><input type="checkbox" name="personality"> Energetic</label><br>
|
||||
<input type="text" placeholder="cat photo URL" required>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</main>
|
||||
```
|
||||
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
||||
|
Reference in New Issue
Block a user