texto alinhado em javascript

document.getElementById("demo").style.textAlign = "left|right|center|justify|initial|inherit"; 

// from w3school
Awful Albatross