From 5103e069e3a774d3e2293d5e1cd42df046c46f7f Mon Sep 17 00:00:00 2001 From: Ait Lamine Ilias <aitlaminilias@gmail.com> Date: Wed, 26 Mar 2025 14:52:52 +0100 Subject: [PATCH] feat: show five pokemons --- index.html | 24 ++++++++++++++++++++++++ style.css | 0 2 files changed, 24 insertions(+) create mode 100644 index.html create mode 100644 style.css diff --git a/index.html b/index.html new file mode 100644 index 0000000..1e7c169 --- /dev/null +++ b/index.html @@ -0,0 +1,24 @@ +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> + +</head> +<body> + <h1>Pokémon List</h1> + <ul id="pokemon-list"></ul> + <script> + const pokemons = ["Pikachu", "Bulbasaur", "Charmander", "Squirtle"]; + const taille = [2, 4,8,10,7]; + const poids = [3,3,9,10,2000]; + const listElement = document.getElementById("pokemon-list"); + + for (let i = 0; i < pokemons.length; i++) { + const li = document.createElement("li"); + li.textContent = pokemons[i] + ' ' + poids[i] + 'kg ' + taille[i] + 'm'; + listElement.appendChild(li); + }; + </script> +</body> +</html> \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..e69de29 -- GitLab