files
Juegos/adivina/index.html

42 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Adivina el Número</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1 id="title">¡Adivina el número!</h1>
<div id="game-box" role="group" aria-labelledby="title">
<p>Estoy pensando en un número entre 1 y <span id="range-max">100</span>.</p>
<p>¿Puedes adivinarlo en <span id="attempts-total">7</span> intentos?</p>
<label for="difficulty">Dificultad:</label>
<select id="difficulty">
<option value="normal" selected>Normal (1-100, 7 intentos)</option>
<option value="facil">Fácil (1-50, 10 intentos)</option>
<option value="dificil">Difícil (1-200, 7 intentos)</option>
<option value="extremo">Extremo (1-1000, 10 intentos)</option>
</select>
<div class="input-row">
<label for="guess-input" class="sr-only">Tu número</label>
<input id="guess-input" type="number" min="1" max="100" placeholder="Tu número" inputmode="numeric" />
<button id="guess-btn">Adivinar</button>
<button id="restart-btn" class="hidden" aria-live="polite">Jugar de nuevo</button>
</div>
<div id="error" class="error" aria-live="polite"></div>
<div id="info" aria-live="polite"></div>
<div id="attempts">Intentos restantes: <span id="attempts-left">7</span></div>
<div id="best">Mejor marca: <span id="best-score"></span></div>
<div id="history">
<h2>Historial</h2>
<ul id="history-list"></ul>
</div>
</div>
<script src="script.js"></script>
</body>
</html>