Coding
Appearance
<!DOCTYPE html> <html lang="en"> <head>
<meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tabs Game</title> <link rel="stylesheet" href="styles.css">
</head> <body>
Tab 1
Tab 2
Tab 3
Welcome to Tab 1
This is the first tab where you can start the game.
<button onclick="startGame()">Start Game</button>
Tab 2 - Game Progress
Your current progress is displayed here.
Tab 3 - Settings
Here you can adjust the game settings.
<script src="script.js"></script>
</body> </html>
- {
margin: 0; padding: 0; box-sizing: border-box;
}
body {
font-family: Arial, sans-serif; padding: 20px;
}
.tabs {
display: flex; margin-bottom: 20px;
}
.tab {
padding: 10px 20px; background-color: #f0f0f0; margin-right: 5px; cursor: pointer;
}
.tab:hover {
background-color: #ddd;
}
.tab-content {
display: none; margin-top: 20px;
}
.tab-content h2 {
margin-bottom: 10px;
}
.active {
background-color: #ccc;
}
- tab1 {
display: block;
}
function showTab(tabId) {
// Hide all tab contents const tabContents = document.querySelectorAll('.tab-content'); tabContents.forEach(content => content.style.display = 'none');
// Remove active class from all tabs const tabs = document.querySelectorAll('.tab'); tabs.forEach(tab => tab.classList.remove('active'));
// Show selected tab content document.getElementById(tabId).style.display = 'block';
// Add active class to the clicked tab const selectedTab = Array.from(tabs).find(tab => tab.textContent === tabId.replace('tab', 'Tab ')); selectedTab.classList.add('active');
}
function startGame() {
// Placeholder function to start the game alert("Game Started!");
}
Computer science
- Computer programming, the process of creating and maintaining the source code of computer programs
- Line coding, in data storage
- Source coding, compression used in data transmission
- Coding theory
- Channel coding
Other uses
- Coding (social sciences), an analytical process in which data are categorized for analysis
- Coding strand of DNA in molecular biology
- Legal coding, the process of creating summary or keyword data from a document in the legal profession
- Medical coding, representation of medical diagnoses and procedures in standard code numbers
- Number coding in Metro Manila, a road space rationing policy implemented in Metro Manila, Philippines, commonly referred to as "coding"
- Coding (therapy), alternative therapeutic methods used to treat addictions in the post-Soviet countries
- Queer coding