Canvas

Canvas Tutorials

Canvas Methods and Properties

HTML canvas textAlign Property

HTML canvas textAlign Property

 

 

The textAlign property is used to sets or returns the current alignment for text content, according to the anchor point.

 

Syntax:-

 

Its syntax is:- context.textAlign=center | end | left | right | start;

 

Further Explanation:-

 

Values Description
start Default. The text starts at the specified position
end The text ends at the specified position
center The center of the text is placed at the specified position
left The text starts at the specified position
right The text ends at the specified position

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas