HTML - Add consecutive empty spaces

December 2016


In HTML, consecutive spaces are ignored by browsers, as well as carriage returns and tabs.

To insert multiple consecutive spaces, it is necessary to use a specific HTML entity called a non-breaking space, the HTML code is as follows:
  •  

For tabs or advanced formatting, you can use the CSS: the white-space property.
  • This property allows you to define the spaces that will be displayed or not.
  • The "pre" value shows all spaces.

Learn more [W3C specification

Related :

This document entitled « HTML - Add consecutive empty spaces » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.