What is the difference between the following line-height settings?

Advertisement

line-height: 20px
line-height: 2

  • The value of 20px will set the line-height to 20px. The value of 2 will set the line-height to twice the size of the corresponding font-size value.
  • The value of 20px will set the line-height to 20px. The value of 2 is not valid.
  • The value of 20px will set the line-height to 20px. The value of 2 will default to a value of 2px.
  • The value of 20px will set the line-height to 20px. The value of 2 will set the line-height to 20% of the corresponding font-size value.
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment


Share via
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend