Hello,
Let’s start with the mistakes:
Javascript is a language case sensitive
, that is, the reserved word var
will not be interpreted as Var
. The same occurs with the Document
that should be document
and Exemplo
that should be exemplo
, since you declared him with the D
minuscule.
All Javascript code within an HTML code must be within the tag <script></script>
.
Knowing this, convert your code to this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<span id="exemplo"></span>
<script>
var exemplo = 10;
document.getElementById('exemplo').innerHTML = exemplo;
</script>
</body>
</html>
document.getElementById("pontos").innerHTML = exemplo;
javascript is case sensitive, beware of uppercase– Ricardo Pontual