# height attribute

Type: | length, percentage
Inherited: | no
Used By: | All block elements
Default: | none
See: | background-image-height dpi overflow size width

The height of the block on the page, or for pages the height of the page itself. The height is the total of any vertical margins, borders and padding, as well as the content of the element itself.
For arcto elements, the height is the height of the ellipse the arc is taken from.
For graphs and line graphics (e.g. the shape tag), the height must be set, either using this attribute or the size attribute.
The height, like the width, is a recommendation only. If the specified height isn't enough to contain the elements children, it will be expanded as necessary.
Unlike the width attribute, the height of an element is not relative to the page height.

Unlike the WIDTH element, the following code would not work (to fix this example, the height of the DIV element has to be set to an absolute value, eg. `<div height="800">`)

    <body height="800">
      <div height="100%">
        <p height="50%" border="1">50% of the page height</p>
      </div>
    </body>

Set the size of the image explicitly. If not set, the width and height are determined by the pixel size and default dpi of the image.

    <img src="thinimage.jpg" height="200" width="50"/>

    <!-- The same image, with a vertical margin -->
    <img src="thinimage.jpg" margin-top="20" margin-bottom="20" height="240" width="50"/>

Set the size of the pages in the document to be 210mm x 297mm - also known as ISO A4. The two lines are equivalent

    <body width="210mm" height="297mm">
    <body size="A4">

With this example, any PBR tags with a class of "letterlandscape" will be set to that size.

    <style>
    pbr.letterlandscape { width:11in; height:8.5in }
    </style>