Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

1.0 KiB

title
title
Inherit Styles from the Body Element

Inherit Styles from the Body Element


Problem Explanation

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.

Solutions

Solution 1 (Click to Show/Hide)

Create a h1 element with the text Hello World:

add h1 after </style> element:

    <h1>Hello World</h1>

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>:

    color: green;
    font-family: monospace;

Full solution

<style>
  body {
    background-color: black;
    color: green;
    font-family: monospace;
  }
</style>

<h1>Hello World</h1>