Try the HTML Course for Free!

Add Space in HTML – Instructions

/ / HTML, Latest

How to Add Space in HTML: Video

            This video lesson, titled “Inserting Blank Spaces,” shows how to add space in HTML to text. This video lesson is from our complete HTML5 and CSS3 training, titled “Mastering HTML5 and CSS3 Made Easy v.1.0.”

Add Space in HTML: Overview

            This tutorial shows you how to add space in HTML. Any blank spaces you type in HTML text to show in a browser, beyond a single space between words, are ignored. Therefore, you must code your desired blank spaces into your HTML document.

            You can add space in HTML to any lines of text. You can use the   HTML entity name or the   HTML entity number to create blank spaces in both paragraph text and text in tables, for example. Since there is no blank space keyboard character in HTML, you must type either   or   into the HTML code for each space to add. Both these HTML entity references create a non-breaking space in text. The only difference between the two is that   is the HTML entity name and   is the HTML entity number.

            To insert blank spaces in text in HTML, type either   or   for each space to add. For example, to create five blank spaces between two words in HTML using the   HTML entity name, type the   entity five times between the words. You do not need to type any spaces between the entities.

Entity:  
Example: <p>This would add five &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blank spaces.</p>
Result: This would add five     blank spaces.

A picture of the HTML entity you use to create blank space within text in HTML code.

A picture of the HTML entity you use to create blank space in paragraph text in HTML code.

Add Space in HTML: Instructions

  1. To add blank space in HTML to text, type either &nbsp; or &#160; for each blank space to add.
TOP
SALE! $49 All-Access 0 Days 9 Hours 48 Minutes 36 Seconds      $199 $49 Entire Library!
See Deal