Tryit Editor v1.8

Source Code:
<!DOCTYPE html> <html> <head> <style type="text/css"> body { background:#f3f3f3 url('img_tree.png'); } </style> <script> function displayResult() { document.body.style.backgroundRepeat="repeat-y"; } </script> </head> <body> <button type="button" onclick="displayResult()">Repeat background image only vertically</button> <br> <h1>Hello World!</h1> <p>This is a paragraph</p> </body> </html>
Result:
W3Schools.com - Try it yourself