HTML5 Canvas Text

To align HTML5 Canvas text, we can use the textAlign property of the canvas context, which can be set to start, end, left, center, or right. Unless otherwise specified, the textAlign property is defaulted to left.


Other examples in Canvas (HTML5 Elements)
Result from the Online TryIt-Editor
chrome 1.5safari 5.0Firefox 1.0ie 9.0opera 9.0