I'm doing some homework in HTML/CSS and I can't figure out how to make two headings appear on the same line and aligned to different sides.

To make them appear on the same line I used this:
h1, h2 {display:inline;}
But when I type "h2 {text-align:right;}" it wont align to the right.

This is the first course in HTML so the solution should be pretty basic, but I can't figure it out.