Q:

How to write both h1 and h2 in the same line? 

I have a page and I want simply to make a header.  This header is an <h1> text aligned to the left, and an <h2> aligned to the right, in the same line, and after them, an <hr>.  My code so far look as follows (if you test it, you'll see that it's wrong):
<h1 align="left">Title</h1> 
<h2 align="right">Context</h2> 
<hr/>

Thanks guys! 

A:

h1 and h2 are native display: block elements. 
Make them display: inline so they behave like normal text. 
You should also reset the default padding and margin that the elements have. 

A:

Keyword float:
<h1 style="text-align:left;float:left;">Title</h1> 
<h2 style="text-align:right;float:right;">Context</h2> 
<hr style="clear:both;"/>

A:

In many cases, 
display:inline;

is enough. 
But in some cases, you have to add following:
clear:none;

