How to Indent in WordPress
WordPress comes with two different modes for editing posts and pages. The first mode is "Visual," which uses the open-source TinyMCE plug-in to add functionality similar to word processing software like Microsoft Word and OpenOffice. By default, only the top row of buttons appears, but you can expand the buttons to two rows to display the "Indent" and "Outdent" buttons. You can also edit in "HTML" mode, which allows you to add Cascading Style Sheets (CSS) code to any HTML tag to indent whole blocks of text or just the first line of a paragraph.
Instructions
-
-
1
Log in to the WordPress dashboard from the "wp-admin" directory of your website. Go to "Posts" or "Pages" and click on the name of the post or page you want to edit. Click the "Visual" tab on top of the editor box and press "Alt+Shift+Z" to show a second row of buttons on the editor toolbar. Place the cursor in front of the text you want to indent in the editor box and click the "Indent" button.
-
2
Click the "HTML" tab on the editor box to view the HTML of your post or page. Locate the HTML tag in front of the content you want to indent and add "padding-left: 30px;" to the "style" attribute:
<p style="padding-left: 30px;">
The editor generates this same code for indents when you indent using the "Visual" editing mode. Change "30px" to a different pixel amount to change the size of the indentation.
-
-
3
Replace "padding-left" with "text-indent" if you only want to indent the first line of a paragraph:
<p style="text-indent: 30px;">
No equivalent button exists in the "Visual" editing mode, but WordPress will not strip this code out after you switch to "Visual" and save.
-
1
References
- Photo Credit Comstock Images/Comstock/Getty Images