Canvas

Canvas Tutorials

Canvas Methods and Properties

HTML canvas measureText() Method

HTML canvas measureText() Method

 

 

The measureText() method is used to returns an object that contains the width of the specified text, in pixels.

 

Syntax:-

 

Its syntax is:- context.measureText(text).width;

 

Further Explanation:-

 

Parameter Description
text The text to be measured

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas