Home Experience & Tips Sharing Standard Post

Standard Post

How to Indent the First Line of Paragraphs by Two Spaces in WordPress Articles

After building a website, how to automatically indent the first line of each paragraph by two characters when publishing articles? The method to achieve paragraph first-line indentation is very simple, just insert a piece of CSS code. The specific method is as follows: 1. Find an article on your blog, right-click via Chrome, click the inspect button, click on the article content, and check the class of the parent div...

Updated on November 1, 2019 About 1 minute read
WordPress网站发文章段落首行缩进空两格的方法

After setting up the website, how can you achieve automatic first-line indentation for each paragraph when publishing articles?First-line IndentIndent by two spaces?

The method to achieve paragraph first-line indentation is very simple; you just need to insert a piece of CSS code. The specific steps are as follows:

1. Find any article on your blog, then use Chrome's right-click 'Inspect' button, click on the article content, and check the class value of the upper div. For example, the value for Naiba's theme is entry-content, as shown in the figure below:

entry-content

 

2. Click Appearance – Customize – Additional CSS, then insert the following CSS code and save.

.entry-content p { text-indent: 2em }

Refresh the page, and you will see the function of automatically indenting two spaces at the beginning of each paragraph.

Of course, if you don't know how to find the class value of your theme, you can also directly insert

p { text-indent: 2em }

But then the text you add in widgets and other places will also be automatically indented by two spaces.

You can also add the CSS code to your theme's CSS file.

3.6/5 - (5 votes)
Previous How to Add a Call Function to a WordPress Website Continue reading content around the same timeline. Next Tutorial on building a website with Typecho in an LNMP environment View the next related tutorial or experience.

AI Website Building Assistant

🤖
Hello! I am the Naibabiji AI Assistant. How can I help you?
Quick Consultation: