Container style sample

This sample shows four containers.

<div style="color: maroon; background-color: orange;">
  This text is in the div.
  <p style="background-color: silver;">
    This is the paragraph.
    <a href="nowhere.html">Link to nowhere</a>
    <span style="font-style: italic">Text in span.</span>
  </p>
</div>
          

The block container's contents are in different lines.
div and p are block containers.
The in-line containers are on the same line with the text in the paragraph.
a and span are in-line containers.

The containers within a parent containver often inherit properties from their parent container.
The p container is inside the div container, so the div is the partent of the p.
The maroon color is inherited from the div to the p.
The span container is inside the p container, and inherits the maroon color from the p container.
The   a   container always has its own color (initially blue), and does not inherit the color.

This text is in the div.

This is the paragraph. Link to nowhere Text in span.