FE/CSS

[ CSS ] CSS white-space Property

HEON.D 2022. 6. 17. 02:49
  • normal: The default value. Multiple whitespaces are collapsed into one. The text wraps to the next line when needed.
  • nowrap: Multiple whitespaces are collapsed into one, but the text doesn’t wrap to the next line.
  • pre: Same results as using the <pre> where all the whitespaces will be kept as is and the text only wraps when line breaks are in the content.
  • pre-line: Multiple whitespaces are collapsed into one, the text breaks to the next line when needed or with line breaks in the content.
  • pre-wrap: Similar to pre, but the text also wraps when needed.