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 - Force Spaces

Description:


How to control the spaces in an html page.

Code:

<html>
<body>

This is normal text with     spaces   . <br /> 

This is normal text with &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spaces &nbsp;&nbsp;&nbsp;&nbsp;  .

</body>
</html>

Play with the code:

See working example:


Explanation:

To preserve the spaces in your text, use &nbsp; instead of space.

See Also:

HTML: Html, Body, Br


Online Html Forum  Discuss this tutorial in our HTML forum


     Online Loans | Loans | Ringtones | Ringtones | Mortgages
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp