To indent, or not to indent, that is the question. If you want to indent text on your website, there is no easy and fast way to do it in WordPress (unless you’re using the Classic Editor).
I’ll show you how to easily indent paragraphs in WordPress using various methods. Let’s get started.
Note: when changing the indent using CSS code, feel free to adjust the padding-left or text-indent value to whatever works for you. In the examples below I’ve used 40px.
Indent a paragraph in Classic Editor
Visual editor
- Make sure you’re in Visual mode
- Select the paragraph you want to indent
- Click on Increase indent

Code editor
- Click on Text view
- Include the code listed below
<p style="padding-left: 40px;">Your text goes here.</p>

Indent a paragraph in Gutenberg Editor
Using the Classic block
- Add a Classic block
- Select the paragraph you want to indent
- Click on Increase indent

Using the custom HTML block
- Add a Custom HTML block
- Include the code listed below
<p style="padding-left: 40px;">Your text goes here.</p>

Indent all paragraphs on your site
Using custom CSS
- Go to Appearance – Customize – Additional CSS
- Insert the code listed below
- Click on Publish to save
article p {
padding-left: 40px;
}



Indent the first line of a paragraph
Using the custom HTML block
- Add a Custom HTML block
- Insert the code listed below
<p style="text-indent: 40px;">Your text goes here.</p>

Indent the first line of all paragraphs
Using custom CSS
- Go to Appearance – Customize – Additional CSS
- Insert the code listed below
- Click on Publish to save
article p {
text-indent: 40px;
}



Apply a hanging indent to a paragraph
Using the custom HTML block
- Add a Custom HTML block
- Insert the code listed below
<p style="padding-left: 40px; text-indent: -40px">Your text goes here.</p>

Apply a hanging indent to all paragraphs
Using custom CSS
- Go to Appearance – Customize – Additional CSS
- Insert the code listed below
- Click on Publish to save
article p {
padding-left: 40px; text-indent: -40px;
}



That’s it folks, you have almost all possible ways to indent text in WordPress. Let me know if it worked for you.
P.S. Save the custom CSS code and then apply it again if you plan to change your theme (it won’t be saved when you switch themes).
Also, the instructions should work fine for most WordPress themes like Astra or Kadence.