Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I indent the first line of a paragraph using HTML inline styling? [duplicate]

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?

like image 841
jarrodwhitley Avatar asked Feb 19 '16 19:02

jarrodwhitley


People also ask

How do you indent the first line in HTML?

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).

How do you indent a paragraph in HTML?

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.

How do you indent the first line of a paragraph in CSS?

Use the text-indent property to indent the first line of a paragraph. Possible values are % or a number specifying indent space.


1 Answers

This should work:

<p style="text-indent: 50px">
like image 191
tenor528 Avatar answered Oct 11 '22 16:10

tenor528