What sorts of things can child elements inherit from their parents?


#1

Question

This exercise says that child elements can inherit from their parents. What sorts of things can child elements inherit from their parents?

Answer

When you dive into our CSS course you will learn that child elements inherit most of their styling from their parent elements. In other words, most styles cascade down from parents to children.


FAQ: Learn HTML Elements - Intro to HTML - HTML Structure
#2

I understand about the styling part, but what about the behavior that is mentioned in the lesson ?


#3

Moreover, the relationship parent, child, and sibling is important to manipulate
HTML elements via Javascript language. For example, If you understand that the parent of this list of items is ul element, you can add one more item within it when a user clicks a button on your web page.

<ul>
  <li>Walk my dog</li>
  <li>Buy some milk</li>
  <li>Finish math homework</li>
</ul>

Please keep learning HTML and CSS. They are very important. Then, you can adventure to Javascript.