HTML - Add consecutive empty spaces

Ask a question

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
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team