Control the Flow and Formatting of Text with 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 to control the flow of text:

<html>
   <head>
   </head>
   <body>
      <p style = "white-space:pre;">
         This text has a line break and the white-space pre setting tells the browser to honor
         it just like the HTML pre tag.</p>
   </body>
</html>
Updated on: 2020-01-31T06:24:57+05:30

322 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements