97 lines
2.7 KiB
HTML
97 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Pokémon Info</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
background-color: #f2f2f2;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
margin: 0;
|
|
padding: 20px;
|
|
}
|
|
input[type="text"] {
|
|
padding: 8px;
|
|
width: 200px;
|
|
border: 2px solid #4caf50;
|
|
border-radius: 5px;
|
|
margin-right: 10px;
|
|
}
|
|
input[type="button"] {
|
|
padding: 8px 15px;
|
|
background-color: #4caf50;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
}
|
|
input[type="button"]:hover {
|
|
background-color: #45a049;
|
|
}
|
|
#pokemonweight {
|
|
font-size: 1.2em;
|
|
margin-top: 15px;
|
|
color: #333;
|
|
}
|
|
#pokeimage {
|
|
margin-top: 10px;
|
|
width: 150px;
|
|
height: 150px;
|
|
border-radius: 10px;
|
|
border: 3px solid #333;
|
|
object-fit: cover;
|
|
}
|
|
h3 {
|
|
color: #4caf50;
|
|
margin-top: 30px;
|
|
}
|
|
ul {
|
|
list-style-type: none;
|
|
padding: 0;
|
|
font-size: 1em;
|
|
}
|
|
ul li {
|
|
background-color: #e0f7fa;
|
|
margin: 5px 0;
|
|
padding: 8px;
|
|
border-radius: 5px;
|
|
text-align: center;
|
|
transition: background-color 0.3s;
|
|
}
|
|
ul li:hover {
|
|
background-color: #b2ebf2;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<input type="text" name="" id="pokemon" placeholder="Enter pokemon name">
|
|
<input type="button" value="submit" id="submit" onclick="pokemonapi()">
|
|
<p id="pokemonweight"></p>
|
|
<img src="" alt="" id="pokeimage">
|
|
|
|
<h3>Possible pokemon names</h3>
|
|
<ul>
|
|
<li>Bulbasaur</li>
|
|
<li>Charmander</li>
|
|
<li>Squirtle</li>
|
|
<li>Pikachu</li>
|
|
<li>Meowth</li>
|
|
<li>Psyduck</li>
|
|
<li>Golduck</li>
|
|
<li>Poliwag</li>
|
|
<li>Poliwhirl</li>
|
|
<li>Poliwrath</li>
|
|
<li>Abra</li>
|
|
<li>Kadabra</li>
|
|
<li>Alakazam</li>
|
|
<li>Machop</li>
|
|
<li>Machoke</li>
|
|
<li>Machamp</li>
|
|
</ul>
|
|
<script src="script.js"></script>
|
|
</body>
|
|
</html> |