<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Canvas в HTML5</title>
</head>
<body>
<canvas id='test' width='600px' height='600px'></canvas>
<script>
var canvas = document.querySelector("#test"),
context = canvas.getContext('2d'),
image = new Image();
image.src = 'https://javascript.ru/cat/list/donkey.gif';
image.onload = function() {
var pattern = context.createPattern(image, 'repeat');
context.font = "24px serif";
context.fillText('WickerpediA', 0, 30);
context.rect(0,50,600,600);
context.fillStyle = pattern;
context.fill();
}
</script>
</body>
</html>