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?
Indent First Line of Paragraph in HTML using CSSUse the text-indent property. It accept any pixel value. Here the selector is 'p' aka 'paragraph' and we are setting the 50-pixel indentation (white space at the beginning of the paragraph).
Indent the first line of a paragraph with text-indentPixels (px), em, rem, even percentage (%) units will work. Using a relative unit like percentage will change the amount of indentation based on the width of the webpage.
Use the text-indent property to indent the first line of a paragraph. Possible values are % or a number specifying indent space.
This should work:
<p style="text-indent: 50px">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With