1. Home
  2. Computing & Technology
  3. Web Design / HTML

height

By , About.com Guide

height Description:

The height property defines the height of the element.

height in CSS Versions:
height Syntax:

height: <length> | <percentage> | auto | inherit

  • length
    A specific length (include unit of measure).
  • percentage
    A percentage of the height of the parent element.
  • auto
    Allows the user-agent to define the height based on inheritance and pre-set user-agent rules.
  • inherit
    The element should have the same height setting as the parent.
height Initial Value:

auto

height Applies To:

All block-level and replaced elements.

height Inheritance:

This property is not inherited.

height Browser Support:
height Examples:

Standard height property

<p style="height : 500px;">
This paragraph is 500px tall.
</p>
height Special Notes:
  • Negative values are not allowed.
  • When used for replaced elements, the height will be enforced by scaling the element.
More height Information:

Return to the Style Library

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: height>

©2009 About.com, a part of The New York Times Company.

All rights reserved.