My issue
hacer un click con mas opciones y con imagenes
My code
// your code goes here
Learning course: Learn HTML / CSS
Problem Link: CodeChef: Practical coding for everyone
hacer un click con mas opciones y con imagenes
// your code goes here
Learning course: Learn HTML / CSS
Problem Link: CodeChef: Practical coding for everyone
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
}
.container {
text-align: center;
margin-top: 50px;
}
.options {
display: inline-block;
margin: 10px;
}
.button {
display: inline-block;
background-color: #3498db;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
img {
max-width: 100px;
height: auto;
margin-top: 10px;
}
</style>
</head>
<body>
<div class="container">
<div class="options">
<button class="button" onclick="showOption('option1')">
Option 1
</button>
<img src="image1.jpg" alt="Option 1 Image">
</div>
<div class="options">
<button class="button" onclick="showOption('option2')">
Option 2
</button>
<img src="image2.jpg" alt="Option 2 Image">
</div>
<div class="options">
<button class="button" onclick="showOption('option3')">
Option 3
</button>
<img src="image3.jpg" alt="Option 3 Image">
</div>
</div>
<script>
function showOption(option) {
// You can perform actions based on the selected option
alert('You selected ' + option);
}
</script>
</body>
</html>