Prev Demo
HTML5
>
Canvas Texts
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Canvas Texts</title> </head> <body> <h2><i>Canvas text</i></h2> <canvas id="myCanvas" width="600" height="300"></canvas> <script> var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); context.font = 'bold 18pt Calibri'; context.fillText('TECHFUNDA', 10, 200); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output