ProfileCrest Developer Blog โ€” Tutorials & Guides
MARKDOWN SYNTAX September 16, 2026 7 min read CodeCrest Editorial Team

How to Center Align Text, Badges, Tables & Images in GitHub Markdown

Direct Answer (TL;DR)

To center align elements in GitHub Markdown, wrap them in an HTML <div align="center"> or <p align="center"> block. Ensure there is a blank empty line between the HTML container tags and any raw Markdown content to guarantee correct formatting.

Centering Badges and Images Without Breaking Formatting

<!-- Correct Way to Center Markdown Content in GFM -->
<div align="center">

# John Doe
### Senior Distributed Systems Architect

[![LinkedIn](https://img.shields.io/badge/LinkedIn-0A66C2?style=for-the-badge&logo=linkedin)](https://linkedin.com)
[![GitHub](https://img.shields.io/badge/GitHub-181717?style=for-the-badge&logo=github)](https://github.com)

</div>

Frequently Asked Questions

โ“ Why did my markdown syntax break when centering?

You must include an empty blank line after <div align="center">. Without an empty line, GitHub treats inner content as raw HTML text instead of parsing Markdown.

Build a Visually Stunning GitHub Profile in 60 Seconds

Design Bento grid layouts, verified badges, dynamic memes, and trophies automatically with ProfileCrest.

๐Ÿš€ Launch Profile GeneratorExplore Templates โ†’