Inheritance of CSS properties

Let's say we have a paragraph, and in it some text in the tag i:

html<p>
  This is some <i>text</i> in paragraph.
</p>

Let's color the paragraphs red:

cssp {
  color: red;
}

As a result, not only the paragraph text will be colored, but also the text of the i tag:

The thing is that the property color is inherited. This means that if a parent tag has a certain color, then the descendants will have the same color. Not all CSS properties are inherited, but many (of those that you already know - all are inherited).

If desired, however, you can override the parent property by specifying a child selector. For example, let's set the paragraph to red and the italic to blue:

html<p>
  This is some <b>text</b> in paragraph.
</p>
cssp {
  color: red;
}
i {
  color: blue;
}

Результат:

The order of selectors in CSS code does not matter in this case. If you swap the i selector and the p selector, everything will work the same:

html<p>
  This is some <b>text</b> in paragraph.
</p>
cssi {
  color: blue;
}
p {
  color: red;
}

Результат:

Задание 1

After studying the code, tell me what color the text in the tag b will be:

html<p>
  This is some <b>text</b> in paragraph.
</p>
cssp {
  color: blue;
}
Задание 2

After studying the code, tell me what color the text in the tag b will be:

html<p>
  This is some <b>text</b> in paragraph.
</p>
cssp {
  color: blue;
}
b {
  color: red;
}
Задание 3

After studying the code, tell me what color the text in the tag b will be:

html<p>
  This is some <b>text</b> in paragraph.
</p>
cssb {
  color: red;
}
p {
  color: blue;
}
Задание 4

After studying the code, tell me what color the text in the li tag will be:

html<ul>
  <li>text</li>
  <li>text</li>
  <li>text</li>
</ul>
cssul {
  color: blue;
}
Задание 5

After studying the code, tell me what color the text in the li tag will be:

html<ul>
  <li>text</li>
  <li>text</li>
  <li>text</li>
</ul>
cssul {
  color: blue;
}
li {
  color: red;
}
Задание 6

After studying the code, tell me what color the text in the tag i will be:

html<ul>
  <li>text <i>italic</i> text</li>
  <li>text <i>italic</i> text</li>
  <li>text <i>italic</i> text</li>
</ul>
cssul {
  color: blue;
}
li {
  color: red;
}
i {
  color: green;
}
Задание 7

After studying the code, tell me what size the text will be in the i tag:

html<ul>
  <li>text <i>italic</i> text</li>
  <li>text <i>italic</i> text</li>
  <li>text <i>italic</i> text</li>
</ul>
cssi {
  font-size: 30px;
}
ul {
  font-size: 20px;
}
li {
  color: red;
  font-weight: bold;
}