Do not confuse with spaces. For example, older versions of IE will not know what you're talking about. In addition, however, there are cleaner methods in general.
For colorless indents, use the text-indent property.
p { text-indent: 1em; }
Jsfiddle demo
Edit:
If you want the space to be colored, you might consider adding a thick left border to the first letter. (I would almost, but not quite say βinstead,β because indentation can be a problem if you use both. But it seems to me that itβs embarrassing to rely solely on the indented border.) You can specify how far and how far wide, color uses left margin on left / margin / width.
p:first-letter { border-left: 1em solid red; }
Demo
chao May 14 '13 at 8:40 pm 2013-05-14 20:40
source share