Control the line Breaks and Spaces HTML Code For Website - Learn About Website | DaddyFile

0

The HTML <pre> Element Explain

The HTML <pre> element defines preformatted text.
The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.



Html Code:

<!DOCTYPE html>
<html>
<body>

<p>The pre tag preserves both spaces and line breaks:</p>

<pre>
   My Bonnie lies over the ocean.

   My Bonnie lies over the sea.

   My Bonnie lies over the ocean.
 
   Oh, bring back my Bonnie to me.
</pre>

</body>
</html>




Html Code Result:

The pre tag preserves both spaces and line breaks:

 My Bonnie lies over the ocean.

  My Bonnie lies over the sea.

  My Bonnie lies over the ocean.
   
  Oh, bring back my Bonnie to me.

Post a Comment

 
Top