tab space in html

Posted on 2011-03-23
Last Modified: 2012-06-27

I want to add 5/10 spaces in html at a lot of places. What is the better alternative using css or otherwise .. instead of writing   so many times :(

Please reply .. thanks !
Question by:hipal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
LVL 24

Accepted Solution

jimyX earned 167 total points
ID: 35198076
I am not familiar with css, but to add many spaces, I do use <pre>:
<PRE>     </PRE>

Author Comment

ID: 35198080
Using pre still I have to write  nbsp   :(
LVL 10

Assisted Solution

by:Asim Nazir
Asim Nazir earned 167 total points
ID: 35198145
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

LVL 24

Expert Comment

ID: 35198147
Not actually. If you used it this way:

<PRE>hipal     hipal</PRE>

Then you will get your five spaces between the two words.

Author Comment

ID: 35198171
I do not want to use pre ..becoz I want to give spaces in my list items .. where pre is not working ..

or may be I am doing something wrong

Author Comment

ID: 35198178
Can someone please elaborate more on padding-right:5em thing ..

LVL 10

Expert Comment

by:Asim Nazir
ID: 35198181
If you are using CSS, I would suggest the following:

p:first-letter { text-indent:1em; }

This will indent the first line like in traditional publications.

Author Comment

ID: 35198195
no I want to give 5 spaces at random places and not just start or a fix place ..

thanks for reply though :(
LVL 17

Assisted Solution

jrm213jrm213 earned 166 total points
ID: 35198733
There is no tab in html. Programs basically do with it what they want some completely ignore it like html. Some programs may represent a tab as 1 empty space, 3 empty spaces, 5 empty spaces etc... it is the programs choice of how it wants to represent a piece of data.

This article gives a number of ways to emulate a tab space:

People have provided you the alternatives you are looking for, no matter what - you are going to need to "emulate" your spaces...

The only other thing I could think to do is to put a span around your text and use css to pad it left or right...

Hello <span style="padding-left: 3em;">Dave</span> how are you today.

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question