1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello, GNOME!</title>
<!-- Use JavaScript to show a greeting when someone clicks the button -->
<script type="text/javascript">
function greeting () {
document.getElementById ("greeting").innerHTML = ("O hai!");
}
</script>
<!-- Very basic CSS style using the GNOME font -->
<style type="text/css">
body {
font-face: Cantarell, sans-serif;
text-align: center; }
</style>
</head>
<body>
<br /> <br />
<button type="button" onclick="greeting()">Hello, GNOME!</button>
<!-- Empty H1 element gets filled in when the button is clicked -->
<h1 id="greeting"></h1>
</body>
</html>
|