How do I center text with CSS How to center align text with CSS. Source Code: 1 2 3 .yourClass { text-align: center; } Result: Your center aligned text You Might Also Like Is T4 Supported In Entity Framework 3.5 November 7, 2016 data at the root level is invalid. line 1 position 1 November 7, 2016 How do I set a border radius in CSS October 15, 2016