Gaming Web premium code for free.
Code:
<!DOCTYPE html>
<html>
<head>
<title>My Gaming Website</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<style>
/* set global styles */
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
margin: 0;
padding: 0;
}
/* style the header */
header {
background-color: #333;
color: #fff;
padding: 20px;
}
header h1 {
margin: 0;
}
nav ul {
list-style: none;
margin: 0;
padding: 0;
}
nav li {
display: inline-block;
margin: 0 10px;
}
nav a {
color: #fff;
text-decoration: none;
}
/* style the main content */
main {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
section {
margin-bottom: 30px;
}
section h2 {
margin-top: 0;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
li {
margin-bottom: 10px;
}
li a {
color: green;
text-decoration: none;
}
li a:hover {
text-decoration: underline;
color: darkgreen;
}
/* style the footer */
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 20px;
}
footer p {
margin: 0;
}
footer a {
color: #fff;
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
</style>
<body>
<header>
<h1>Welcome to My Gaming Website!</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Games</a></li>
<li><a href="#">Blog</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section>
<h2>New Releases</h2>
<ul>
<li><a href="#">Game 1</a></li>
<li><a href="#">Game 2</a></li>
<li><a href="#">Game 3</a></li>
</ul>
</section>
<section>
<h2>Popular Games</h2>
<ul>
<li><a href="#">Game 4</a></li>
<li><a href="#">Game 5</a></li>
<li><a href="#">Game 6</a></li>
</ul>
</section>
</main>
<footer>
<p>© 2023 by Syperquick.site. All rights reserved.</p>
</footer>
<script>
// select the navigation links
const navLinks = document.querySelectorAll('nav a');
// add an event listener to each link to highlight it when clicked
navLinks.forEach(link => {
link.addEventListener('click', (event) => {
event.preventDefault(); // prevent default link behavior
navLinks.forEach(link => link.classList.remove('active')); // remove active class from all links
link.classList.add('active'); // add active class to clicked link
});
});
// select the game list items
const gameItems = document.querySelectorAll('ul li');
// add an event listener to each item to show a message when clicked
gameItems.forEach(item => {
item.addEventListener('click', () => {
const gameName = item.querySelector('a').textContent;
alert(`You selected ${gameName}`);
});
});
</script>
</body>
</html>
Thanks for reading.
ReplyDeletePlease tell me if you want another web code for free
ReplyDelete