CSS white-space Property

CSSWeb DevelopmentFront End Technology

Use the white-space property to work with white-space inside an element:

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         p.demo1 {
            white-space: normal;
         }
         p.demo2 {
            white-space: pre;
         }
      </style>
   </head>
   <body>
      <h2>Control white-space</h2>
      <p class = "demo1">
         This is demo text.
         This is demo text.
      </p>
      <p class = "demo2">
         This is demo text.
         This is demo text.
      </p>
   </body>
</html>
raja
Published on 07-Jun-2018 14:47:59
Advertisements