Categories
CSS & HTML Tips

CSS: Align Left – Make text or image aligned left with CSS

Believe it or not, though this is rather basic in CSS, someone just poked on Gtalk to ask how he could align a paragraph left in HTML as he could in Word.

Here goes a quick post for the solution:

p {text-align:left;} /* a generic styling rule for all p tags to align inner text left */

Just change ‘p’ to whatever selector you need.

There you go, CSS text-align is the rule to go! Other than that, you can also align text right by text-align:right or center by text-align:center.

Want to know how to right align or center align things in CSS?

By Yang Yang

Hello, I'm Yang. I build online businesses that please people. Want to join in and post some useful articles on Kavoir.com? Shoot me a message.

2 replies on “CSS: Align Left – Make text or image aligned left with CSS”

Comments are closed.