CSS: Align Right — Make text or image aligned right in HTML page

Yeah, well, I know, I just wrote a quick post for those who don’t know how to align text left in HTML. Silly. Now comes a redundant one for those who don’t know how to align text right in HTML and CSS.

[Someone from beyond the web page and monitor screen throws me a tomato: Hey, you really think people are as stupid as you can get?!]

…

Anyway, here’s the solution:

p {text-align:right;}

This would prescribe that the text inside all p element to be aligned right, generically of course, because it could be overridden later.

CSS text-align is the rule we should be using here. By default all texts in HTML web pages are left aligned, so apparently text-align:right would be much useful than text-align:left.

Know how to center align or left align in CSS.

Scroll to Top