bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/CSS/CSS Foundations
CSS•CSS Foundations

CSS Height and Width

Flash cards

Review the key moves

1/3
Core idea

What is the main idea behind CSS Height and Width?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Order

Put the learning moves in the order that makes the concept easiest to apply.

CSS height and width Values
CSS Set height and width
CSS Height and Width

The CSS height and width properties are used to set the height and width of an element.

CSS Set height and width

The height and width properties are used to set the height and width of an element.

The height and width do not include padding, borders, or margins. It sets the height and width of the area inside the padding, border, and margin of the element.

CSS height and width Values

The height and width properties can have the following values:

  • auto - This is default. The browser calculates the height and width
  • length - Defines the height or width in px, cm, em, etc.
  • % - Defines the height or width in percent of the containing block
  • initial - Sets the height or width to its default value
  • inherit - The height or width will be inherited from its parent value

Previous

CSS Padding and box-sizing

Next

CSS Min/Max Height and Width