-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex003.html
More file actions
35 lines (35 loc) · 1.18 KB
/
ex003.html
File metadata and controls
35 lines (35 loc) · 1.18 KB
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
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Meu primeiro programa...</title>
<style>
body {
background-color: rgb(74, 74, 233);
color: white; /* Comentário em CSS */
font: normal 20pt Arial;
}
h1 {
color: rgb(235, 214, 32);
}
h2 {
color: rgb(245, 60, 60);
}
</style>
</head>
<body>
<h1>Olá, mundo!</h1> <!-- isso é umm comentário -->
<pp>Já me livrei da maldição!!!</pp>
<h2>AAAAH!!! AGORA EU ENTENDI!! AGORA EU SAQUEI</h2>
<script>
var n1 = Number(window.prompt('Digite um número: ')) // String
var n2 = Number(window.prompt('Digite outro número: ')) // String
var s = n1 + n2
window.alert(`A soma entre ${n1} e ${n2} é igual a ${s}`) // Concatenação
// (number + number) para adição
// (string + string) para concatenação
</script>
</body>
</html>