How To Easily Add Indents For Paragraphs In WordPress

3 minutes read

Do you want to add spaces or indents for paragraphs in WordPress? The main part of your texts on the site is left justified, but sometimes you may need to add indents for the first line of the paragraph to improve the readability of the text. In this article, we will show you how easy it is to add indents for paragraphs in WordPress.

Method 1: Use The Buttons To Add Indents In The Visual Editor

By default, most WordPress themes will display paragraphs aligned to the left.

If you want to indent a paragraph, this can be done by clicking on the “Increase indent” button in the editor. Add an empty space to the left of the paragraph.

In case you need to select more than one paragraph, you will need to select them and press the specified button again.

By the button you can press the required number of times, and the indent will increase all the time. Also, the space can be reduced by clicking on the “Reduce indent” button.

Method 2: Indent The Paragraph Manually In A Text Editor.

Using the corresponding button in the visual editor is the easiest way to add indentation. However, the button will not allow you to control the number of spaces to add.

More advanced users can switch to a text editor and manually add indents. To do this, wrap the paragraph text in <p> and </ p> tags, and then add inline CSS to them like this:

1<p style="padding-left:25px;">Здесь текст вашего абзаца...</p>

This method allows you to control the void that you want to use as an indent. The method is suitable if you do not need to add indents too often.

Method 3: Indent Only The First Line Of The Paragraph

Pages on the web do not use the traditional paragraph spacing used by word processors, which, in turn, add indents to the first paragraph line only.

Even in WordPress, when you indent a paragraph, this space is added to the entire paragraph.

Some news and magazine sites may want to add more traditional indentation. In this case, you will need to add arbitrary CSS code to your theme.

To get started, go to Appearance »Customize to launch customizer WordPress theme. Now click on the “Custom CSS” tab.

You will see a text entry area on the left, where you need to add the following code:

1 p.custom-indent {
2 text-indent:60px;
3 }

This CSS code simply tells the browser that if the paragraph has a class .custom-indent class, then you need to add 60px for the text-indent.

Now, go to record editing and switch to a text editor. Then we wrap the paragraph in the tags <p class = ”custom-indent”> and </ p> like this:

1 <p class="custom-indent">Here is the text of your paragraph ...</p>

We look at the “receded” first line of the paragraph.

This method is useful if you need to draw a few paragraphs. However, if you want to add these styles to all the paragraphs on the site, then the code will need to be changed to:

1 article p {
2 text-indent:60px;
3 }

This CSS rule will automatically indent the first line of each paragraph within a post or page.

We hope this article has helped you learn how to add paragraph indentation in WordPress.

Facebook Twitter LinkedIn Telegram Pocket

Related Posts:

Would you like to add a WordPress widget to your site’s header area? Widgets allow you to easily add content blocks to specific places in your theme. In today’s article, we will show you how easy it is to add a WordPress widget to the site header. Why And When It May Be Necessary To Add A Widget To The Header Widgets allow you to easily add content blocks to specific areas of your theme. These areas are called sidebars or widget areas. The area for widgets in the header or in front of t...
Do you want to add notifications to the admin panel in WordPress? Admin notifications are used by the WordPress core, themes, and plugins to display warnings, notifications, and important information for users on the screen. In this article, we will show you how to add notifications to the WordPress admin panel. Why And When Should I Use Admin Messages In WordPress? WordPress uses notifications in the admin panel to inform users of errors, warnings and messages about the successful completion ...
Have you decided to add keywords and a meta description to WordPress content? Keywords and page descriptions allow you to improve your site’s SEO. In this article, we will show you how to properly add keywords and meta descriptions in WordPress.   Why Add Keywords And Meta Descriptions To WordPress Key words and descriptions will allow you to tell search engines about your content in posts and pages. Keywords are important words or phrases that people most often request if they were looking...