Text Alignment
Move a paragraph of text to the left, center, or right of the page.
Syntax
::left:: Your text here ::
::center:: Your text here ::
::right:: Your text here ::Wrap your text between ::left::, ::center::, or ::right:: at the start, and :: at the end.
Examples
Centered heading
Type this in Contentful:
::center:: Welcome to Our Annual Report ::What you’ll see: The text “Welcome to Our Annual Report” is centered horizontally on the page.
Right-aligned caption
Type this in Contentful:
::right:: Photo credit: Jane Smith ::What you’ll see: The text “Photo credit: Jane Smith” is pushed to the right side of the page.
Left-aligned text (default)
Type this in Contentful:
::left:: This paragraph is explicitly left-aligned. ::What you’ll see: The text is aligned to the left — the same as normal text. Useful if you want to reset alignment after a centered block.
Options / Variations
| Keyword | Effect |
|---|---|
::left:: | Aligns text to the left edge |
::center:: | Centers text horizontally |
::right:: | Aligns text to the right edge |
Tips
- Alignment affects the entire paragraph between the markers. You can’t center just one word inside a sentence — use it on a whole line.
- Works well for captions, pull quotes, and section titles that need to stand out from the normal flow.
Common Mistakes
Forgetting the closing ::
Wrong: ::center:: My centered text
Right: ::center:: My centered text ::
Without the closing ::, the alignment will not be applied.
Mixing alignment with surrounding text on the same line
Each alignment block should be its own paragraph (blank line above and below). Mixing it with surrounding text on the same line may produce unexpected results.
Misspelling the direction
Wrong: ::centre:: text :: (British spelling)
Right: ::center:: text ::
Only left, center, and right are accepted — spelled exactly as shown.