- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="es">
<head>
<title>La pseudoclase :checked</title>
<meta charset="utf-8">
<link rel="stylesheet" href="course.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<header class="page-header">Formulario de datos personales</header>
<main>
<form action="https://echo.htmlacademy.ru/courses" method="post">
<fieldset>
<legend>Solicitud de almuerzo</legend>
<label>Nombre del gato</label>
<input type="text" name="name" value="Cupcakecito">
<div class="half-width">
<label>Elige la carne</label>
<input type="radio" value="1" id="rb-1" name="type"><label for="rb-1">Pollo</label><br/>
<input type="radio" value="2" id="rb-2" name="type"><label for="rb-2">Conejo</label><br/>
<input type="radio" value="3" id="rb-3" name="type"><label for="rb-3">Res</label><br/>
<input type="radio" value="4" id="rb-4" name="type" checked><label for="rb-4">Pavo</label>
</div>
<div class="half-width">
<label>Extras</label>
<input type="checkbox" value="1" id="chb-1" name="add[]"><label for="chb-1">Cucharada de crema agria</label><br/>
<input type="checkbox" value="2" id="chb-2" name="add[]" checked><label for="chb-2">Salsa</label><br/>
<input type="checkbox" value="3" id="chb-3" name="add[]" checked><label for="chb-3">Porción doble</label><br/>
<input type="checkbox" value="4" id="chb-4" name="add[]"><label for="chb-4">Tazón de agua</label><br/>
</div>
</fieldset>
<div class="buttons">
<input type="submit" value="Enviar">
</div>
</form>
</main>
<footer class="page-footer"></footer>
</body>
</html>
CSS
Ha ido a otra página
ObjetivosRealizado
0
- A todos los elementos
labelsituados inmediatamente después de uninputmarcado, asígnales el color de texto#1abc9c. - Usa la pseudoclase de negación para asignar un margen derecho de
15pxa todos los elementosinputque no estén marcados, es decir, que no coincidan con:checked.