SyntaxFix
Write A Post
Hire A Developer
Questions
you could use getAttribute:
var p = document.getElementById("p"); var alignP = p.getAttribute("align");
https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute