Responsive Web Design: Added hint to Inherit Styles from the Body Ele… (#19631)

* Responsive Web Design: Added hint to Inherit Styles from the Body Element

Added hint to Inherit Styles from the Body Element (https://guide.freecodecamp.org/certifications/responsive-web-design/basic-css/inherit-styles-from-the-body-element)

* Added Full solution
This commit is contained in:
greggubarev
2018-10-18 00:51:38 +04:00
committed by Randell Dawson
parent 0dcd041547
commit de5ef2fa9f

View File

@ -3,8 +3,38 @@ title: Inherit Styles from the Body Element
---
## Inherit Styles from the Body Element
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/responsive-web-design/basic-css/inherit-styles-from-the-body-element/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
We need to create a ```h1``` element with the text ```Hello World```, then we need to give all elements on your page the color of ```green``` in our ```body``` element's style declaration, and finally, we need add to our ```body``` element font-family of ```monospace```.
### Solution
#### 1. Create a ```h1``` element with the text ```Hello World```:
add ```h1``` after ```</style>``` element:
```css
<h1>Hello World</h1>
```
#### 2. Give all elements on your page the color of ```green``` and font-family of ```monospace``` in our ```body``` element's style declaration:
add between ```<style>``` and ```</style>```:
```css
color: green;
font-family: monospace;
```
#### Full solution
```css
<style>
body {
background-color: black;
color: green;
font-family: monospace;
}
</style>
<h1>Hello World</h1>
```