Search DaTutorials:  
HOME
Html Tutorials
Basics
Forms
Frames
Hyperlinks and URLS
Images
Lists
Background
Colors
Fonts
Tables
Meta Tags
Events
Javascript Integration
Sound
Other
Search For a Tutorial
Html Reference

HTML Text Formatting Tutorial - Preformatted Text

Description:


How to control the spaces and line breaks in an html page.

Code:

<html>
<body>

This is    normal text with     spaces and

line



breaks. <br /> 

<pre>
This is    preformatted text with     spaces and

line



breaks.
</pre>



Play with the code:

See working example:


Explanation:

To preserve the spaces and line brakes in your text, surround it with the <pre></pre> tags.

See Also:

HTML: Html, Body, Pre, Br


Online Html Forum  Discuss this tutorial in our HTML forum


     Best Credit Cards | Mobile Phones | Loans | Electricity Suppliers | Fast Loans
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp