Usage of white-space property in CSS

The white-space property is used to control the flow and formatting of text.

Example

You can try to run the following code to implement white-space property:

   
   
   
      

         This text has a line break and the white-space pre setting tells the browser to honor          it just like the HTML pre tag.

   
Updated on: 2020-01-31T06:22:55+05:30

90 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements