Illustrating height and width

Be sure to view the source code.

the size of the h1 block changes when the window is resized. It is proportional to the body

the size of the h2 block does not change when the window is resized.It is a fixed number of pixels.

Paragraph do not have any dimensions specified. Paragraph blocks are always the full width of the body, and adjust their height to fit the text when the window is resized.

The style rules

       h1 {width: 40%;
           background-color: silver}
       h2 {height: 100px;
           width: 150px;
           background-color: yellow}
       p {background-color: #ffddff}