<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Drawing Text on the Canvas</title> <style> canvas { border: 3px solid blue; } </style> <script> window.onload = function() { var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("2d"); context.font = "bold 30px italic"; context.fillText("Happy Morning!", 10, 50); }; </script> </head> <body> <canvas id="myCanvas" width="350" height="150"></canvas> </body> </html>