Q:

Center a variable value with InnerHTML

I am writing a really simple HTML program, that should concatenate a variable after some text, and place the whole resulting text in the middle of the screen.
My Code:
document.getElementById('maincontainer').innerHTML = '<center>Your Account ID:</center>' + account;

(account is a string variable)
I would like to put the whole text in the center of my page, but it only center 
the normal text, without centering the value of the variable 'account'.
Is there any way to center the value of 'account' variable, too?

A:

Try this: 
document.getElementById('maincontainer').innerHTML = '<center>Your Account ID:' + account + '</center>';

