19

I'm creating an HTML email and I do not want to use CSS styling in the head (for cross platform compatibility reasons). I need to set an indention for the first line of the paragraph using inline styling only.

How would I do that?

rene
  • 41,474
  • 78
  • 114
  • 152
jarrodwhitley
  • 826
  • 10
  • 29

2 Answers2

17

This should work:

<p style="text-indent: 50px">
Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
tenor528
  • 1,120
  • 13
  • 20
-3

You can try using &nbsp; in sequence, and experiment to find the number you need.

<p> &nbsp; &nbsp; &nbsp; &nbsp; This is a paragraph. </p>

looks like this:

        This is a paragraph.

http://www.w3schools.com/html/html_entities.asp

Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
Kyle Amonson
  • 140
  • 5
  • 1
    From what I understand some email clients won't recognize this method. – jarrodwhitley Feb 19 '16 at 20:25
  • 8
    This does not resemble *"styling"*. It's an attempt at replicating styling by changing content. CSS was introduced to keep style and content separate. For good reason. It's unclear, how this received any upvotes at all. – IInspectable Sep 02 '18 at 20:45