Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

242
Vistas
How to allow and show extra spaces in html

If I have a web page with the following text:

'This is some (a bunch of extra spaces in here) test print'.

..it will show as 'This is some test print'.

But is there a way to keep extra spaces in there without using 'nbsp;' for them?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Either wrap your text within <pre> tags or set the white-space property to pre

Examples:

p {
  white-space: pre;
}
<p>This is some                                    test print</p>

<pre>This is some                                  test print</pre>

about 4 years ago · Juan Pablo Isaza Denunciar

0

There are various ways

  1. Using special character
&nbsp;
  1. Using pre tag as mentioned by @j08692

  2. using an inline element with the desired width & height without content

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda