Conversion Form

VH
IN

About the Unit

VH (Viewport Height): Like VW, VH is a relative unit, but instead of being based on the viewport width, it is based on the height of the viewport. 1vh represents 1% of the viewport height, meaning that if the viewport height is 1000px, 1vh will be equal to 10px. The vh unit is widely used when you want elements to occupy a percentage of the screen height, making the design more adaptable to different device sizes. A common use case is to create 'hero sections' or headers that occupy the full height of the screen. For example, if you set an element’s height to 100vh, it will occupy 100% of the viewport height, ensuring that the content automatically adjusts to the screen height of the device, regardless of its resolution. This unit is also useful for scroll layouts on long pages, where the height of elements is crucial for navigation.

Pro Tip: vhin

Use vh for height-related layout sections and in for print measurements.

Quick Reference: Unit Conversion by Tens

VHIN
10vh1.125in
20vh2.25in
30vh3.375in
40vh4.5in
50vh5.625in
60vh6.75in
70vh7.875in
80vh9in
90vh10.125in
100vh11.25in
110vh12.375in
120vh13.5in
130vh14.625in
140vh15.75in
150vh16.875in
160vh18in
170vh19.125in
180vh20.25in
190vh21.375in
200vh22.5in
210vh23.625in
220vh24.75in
230vh25.875in
240vh27in
250vh28.125in

Live Unit Preview

See how different CSS units affect the size of the box below:

10px

10rem

10em

10%

10vw

10vh

Common Mistake

Use vh for viewport-based heights, in for physical print measurements.

Real Code Example

/* Mobile-first card with vh → in */
.card {
  padding: 0vh;     /* undefinedin */
  font-size: 1.5rem;
  width: min(90vw, 40ch);
}

Frequently Asked Questions About VH

When should I use vh instead of vh?

Use vh for vertical scaling and full-height sections.

How many vh is 1vh?

1vh = 1% of the viewport height.

Is vh affected by screen size?

Yes, it changes with browser height.

Is vh good for hero sections?

Yes, it's perfect for full-screen components.

Keyboard Shortcuts

  • Ctrl + C: Convert
  • Ctrl + I: Invert units
  • Esc: Reset values

More popular conversions