HTML | canvas textAlign Property
The HTML canvas textAlign Property is used to set or return the current alignment for text content, according to the anchor point. Basically, the text will start at that position and the text will end at that specified position.
context.textAlign="center | end | left | right | start";
- start: It has a Default. The text starts at the specified position.
- end: The text ends at the specified position.
- left: It is used to set the text-alignment into left.
- right: It is used to set the text-alignment into right.
- center: It is used to set the text-alignment into the center.
Supported Browsers: The browsers supported by HTML canvas textAlign Property are listed below:
- Google Chrome
- Internet Explorer 9.0
- Apple Safari
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.