Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Center Text Shortcut: Quick Keys for Any App

· 5 min read · Home Automation

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The shortcut to center text is Ctrl+E on Windows and Cmd+E on Mac in most word processors and text editors, including Microsoft Word, Google Docs, and LibreOffice Writer. In HTML and web editors, centering is done with CSS, not a single key. This guide covers the reliable shortcuts for the common apps, what to do when they do not work, and the mistakes that trip people up.

What You'll Need

  • A computer with a keyboard (Windows, Mac, or Linux).
  • The text editor or word processor open with a document that contains the text you want to center.
  • For web work, a basic HTML/CSS editor such as Visual Studio Code or a browser-based editor.

Step-by-Step

  1. Select the text you want to center. Click and drag over the paragraph, or place the cursor inside the paragraph if you want to center the whole block. In most editors, centering applies to the entire paragraph, not just the highlighted characters.
  2. Press the centering shortcut. On Windows or Linux, press Ctrl+E. On Mac, press Cmd+E. This works in Microsoft Word, Google Docs, LibreOffice Writer, Apple Pages (Cmd+E), and most rich-text editors.
  3. Check the result. The paragraph should jump to the center of the page or text area. The alignment button in the toolbar (usually three or four horizontal lines) should now show the center option highlighted.
  4. If you are in a plain-text editor such as Notepad, TextEdit in plain-text mode, or a code editor, the shortcut will not center text because plain text has no alignment. Use a word processor or add HTML/CSS instead.
  5. For web pages (HTML/CSS), centering is done in code. Wrap the text in a block element and apply text-align: center; in CSS, for example <p style="text-align: center;">Your text</p>. There is no universal keyboard shortcut for this in code editors; you type the CSS.
  6. To undo centering, select the paragraph again and press the same shortcut (Ctrl+E or Cmd+E) to toggle back to left alignment, or use the left-align button in the toolbar.

Menu labels and shortcut behavior can differ slightly by app version, device, and region. If Ctrl+E does not work, check the app's Format or Paragraph menu for an alignment option and look at the shortcut shown next to it.

Common Mistakes

  • Expecting Ctrl+E to work everywhere. It centers paragraphs in word processors, but in some apps Ctrl+E opens a search bar or does something else. Always check the app's own menu for the alignment command.
  • Centering only part of a paragraph. Alignment is a paragraph-level property. If you select a few words and center them, the whole paragraph usually centers. To center just a line, put it in its own paragraph.
  • Using spaces to center text. Adding spaces before a line looks centered on one screen but breaks as soon as the font, window size, or device changes. Use the alignment command instead.
  • Confusing center alignment with centering a page. Ctrl+E centers text within the margins. It does not change the page margins or move the page itself.
  • Forgetting to select the right paragraph. If the cursor is in the wrong paragraph, the wrong block gets centered. Click into the correct paragraph first.

Tips

  • Use the toolbar alignment buttons if you forget the shortcut; hovering over them usually shows the keyboard shortcut.
  • In Google Docs, Ctrl+E and Cmd+E center the paragraph. The same shortcut toggles back to left alignment.
  • For headings, centering can look clean, but body text is usually easier to read left-aligned. Center sparingly.
  • In HTML email and web pages, use CSS text-align: center; rather than the old <center> tag, which is obsolete.
  • If you center a lot of text, create a style or paragraph format so you can apply it consistently instead of pressing the shortcut each time.

Troubleshooting

If the shortcut does not center your text, work through these checks in order:

  1. Click inside the paragraph first. The shortcut applies to the paragraph where the cursor sits. If nothing is selected and the cursor is in a table cell or text box, behavior can differ.
  2. Check that you are in an editable document. In a PDF viewer or a read-only file, alignment shortcuts do nothing. Open the file in an editor that allows changes.
  3. Try the menu instead. In Word, look under the Home tab for the paragraph alignment buttons. In Google Docs, use Format > Align & indent. If the menu command works but the shortcut does not, another app may be capturing Ctrl+E.
  4. Close other apps that use Ctrl+E. Some browsers and utilities use Ctrl+E for search or other actions. Switch to the word processor and try again.
  5. Restart the app. Save your work first, then close and reopen the program. This clears temporary glitches.
  6. Check for an update. Install the latest version from the official source. Do not use unofficial downloads.
  7. If you are editing HTML, remember that a keyboard shortcut will not center text in a code editor. Add the CSS rule and preview the page in a browser.

Frequently Asked Questions

What is the shortcut to center text in Word?

Ctrl+E on Windows and Cmd+E on Mac. It centers the paragraph where the cursor is, or all selected paragraphs.

Does Ctrl+E center text in Google Docs?

Yes. Ctrl+E on Windows and Cmd+E on Mac center the current paragraph. Pressing it again returns the paragraph to left alignment.

Why does Ctrl+E do something else on my computer?

Some apps use Ctrl+E for search or other commands. The shortcut only centers text when the active app assigns it to center alignment. Use the app's alignment menu if the shortcut is taken.

How do I center text in HTML?

Use CSS: text-align: center; on the element containing the text. The old <center> tag is obsolete and should not be used.

Can I center text in Notepad?

No. Notepad is a plain-text editor with no alignment features. Use a word processor or an HTML editor instead.

Is there a shortcut to center text on a phone?

Physical keyboard shortcuts are limited on phones. In mobile word-processing apps, use the alignment button in the formatting toolbar, usually shown as lines with a center option.