Here's a complete, simple website for learning programming basics. I'll provide all the necessary HTML, CSS, and JavaScript files that you can use immediately.
html Copy code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CodeFoundations - Learn Programming Basics</title>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<header>
<div class="logo">
<h1>CodeFoundations</h1>
</div>
<nav>
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#concepts">Core Concepts</a></li>
<li><a href="#languages">Languages</a></li>
<li><a href="#tools">Tools</a></li>
<li><a href="#resources">Resources</a></li>
</ul>
</nav>
<div class="theme-toggle">
<i class="fas fa-moon"></i>
</div>
</header>
<main>
<section id="hero">
<div class="hero-content">
<h1>Begin Your Programming Journey</h1>
<p>Learn the fundamental concepts that power modern software development</p>
<a href="#concepts" class="btn">Start Learning</a>
</div>
</section>
<section id="intro" class="container">
<h2>What is Programming?</h2>
<p>Programming is the process of creating a set of instructions that tell a computer how to perform a task. These instructions can be written in various programming languages, which are then translated into a language that computers understand.</p>
<div class="code-example">
<pre><code>// This is a simple program that prints "Hello, World!"
console.log("Hello, World!");</code></pre>
</div>
<p>Programming involves problem-solving, logical thinking, and creativity. As you learn to code, you'll develop these skills while building increasingly complex applications.</p>
</section>
<section id="concepts" class="container">
<h2>Core Programming Concepts</h2>
<div class="concept-grid">
<div class="concept-card">
<div class="concept-icon"><i class="fas fa-book"></i></div>
<h3>Libraries</h3>
<p>Collections of pre-written code that developers can use to perform common tasks without writing the code from scratch.</p>
<p><strong>Examples:</strong> jQuery, NumPy, Pandas</p>
</div>
<div class="concept-card">
<div class="concept-icon"><i class="fas fa-cubes"></i></div>
<h3>Frameworks</h3>
<p>Structured platforms that provide a foundation for developing software applications, often including libraries, tools, and design patterns.</p>
<p><strong>Examples:</strong> React, Angular, Django, Flask</p>
</div>
<div class="concept-card">
<div class="concept-icon"><i class="fas fa-desktop"></i></div>
<h3>Frontend</h3>
<p>The part of a website or application that users interact with directly. It involves everything users see and experience.</p>
<p><strong>Technologies:</strong> HTML, CSS, JavaScript</p>
</div>
<div class="concept-card">
<div class="concept-icon"><i class="fas fa-server"></i></div>
<h3>Backend</h3>
<p>The server-side of applications that handles business logic, database operations, authentication, and server configuration.</p>
<p><strong>Technologies:</strong> Node.js, Python, Ruby, Java</p>
</div>
<div class="concept-card">
<div class="concept-icon"><i class="fas fa-database"></i></div>
<h3>Databases</h3>
<p>Systems that store, organize, and manage data in a structured way, allowing for efficient retrieval and manipulation.</p>
<p><strong>Types:</strong> SQL (MySQL, PostgreSQL), NoSQL (MongoDB, Redis)</p>
</div>
<div class="concept-card">
<div class="concept-icon"><i class="fas fa-code"></i></div>
<h3>Scripts vs Programs</h3>
<p>Scripts are typically shorter pieces of code that automate tasks, while programs are more complex applications with multiple components.</p>
</div>
</div>
</section>
<section id="languages" class="container">
<h2>Programming Languages</h2>
<div class="language-tabs">
<div class="tab-buttons">
<button class="tab-btn active" data-tab="javascript">JavaScript</button>
<button class="tab-btn" data-tab="python">Python</button>
<button class="tab-btn" data-tab="java">Java</button>
<button class="tab-btn" data-tab="csharp">C#</button>
</div>
<div class="tab-content">
<div class="tab-pane active" id="javascript">
<h3>JavaScript</h3>
<p>A versatile language primarily used for web development. It allows you to add interactive elements to websites.</p>
<div class="code-example">
<pre><code>// JavaScript example
function greet(name) {
return `Hello, ${name}!`;
}
console.log(greet("World"));</code></pre>
</div>
<p><strong>Used for:</strong> Web development, server-side programming (Node.js), mobile apps</p>
</div>
<div class="tab-pane" id="python">
<h3>Python</h3>
<p>Known for its readability and simplicity, Python is widely used in data science, AI, and web development.</p>
<div class="code-example">
<pre><code># Python example
def greet(name):
return f"Hello, {name}!"
print(greet("World"))</code></pre>
</div>
<p><strong>Used for:</strong> Data analysis, AI/ML, web development, automation</p>
</div>
<div class="tab-pane" id="java">
<h3>Java</h3>
<p>A class-based, object-oriented language designed to have as few implementation dependencies as possible.</p>
<div class="code-example">
<pre><code>// Java example
public class Greeting {
public static void main(String[] args) {
System.out.println(greet("World"));
}
public static String greet(String name) {
return "Hello, " + name + "!";
}
}</code></pre>
</div>
<p><strong>Used for:</strong> Enterprise applications, Android apps, backend systems</p>
</div>
<div class="tab-pane" id="csharp">
<h3>C#</h3>
<p>Developed by Microsoft, C# is used for Windows applications, game development, and enterprise software.</p>
<div class="code-example">
<pre><code>// C# example
using System;
class Program {
static void Main() {
Console.WriteLine(Greet("World"));
}
static string Greet(string name) {
return $"Hello, {name}!";
}
}</code></pre>
</div>
<p><strong>Used for:</strong> Windows applications, game development (Unity), enterprise software</p>
</div>
</div>
</div>
</section>
<section id="tools" class="container">
<h2>Development Tools</h2>
<div class="tools-container">
<div class="tool-category">
<h3>Related Tools</h3>
<ul>
<li><strong>Code Editors:</strong> VS Code, Sublime Text, Atom</li>
<li><strong>Version Control:</strong> Git, GitHub, GitLab</li>
<li><strong>Package Managers:</strong> npm, pip, Maven</li>
<li><strong>Deployment:</strong> Docker, Kubernetes, Heroku</li>
<li><strong>Testing:</strong> Jest, Pytest, JUnit</li>
</ul>
</div>
<div class="tool-category">
<h3>Non-Related Tools</h3>
<p>These tools aren't directly programming tools but are often used alongside development:</p>
<ul>
<li><strong>Design:</strong> Figma, Adobe XD, Photoshop</li>
<li><strong>Project Management:</strong> Jira, Trello, Asana</li>
<li><strong>Communication:</strong> Slack, Discord, Microsoft Teams</li>
<li><strong>Documentation:</strong> Notion, Confluence, Google Docs</li>
</ul>
</div>
</div>
</section>
<section id="resources" class="container">
<h2>Learning Resources</h2>
<div class="resource-cards">
<div class="resource-card">
<h3>Online Platforms</h3>
<ul>
<li>freeCodeCamp</li>
<li>Codecademy</li>
<li>The Odin Project</li>
<li>MDN Web Docs</li>
<li>W3Schools</li>
</ul>
</div>
<div class="resource-card">
<h3>YouTube Channels</h3>
<ul>
<li>Traversy Media</li>
<li>The Net Ninja</li>
<li>Programming with Mosh</li>
<li>CS50</li>
<li>Fireship</li>
</ul>
</div>
<div class="resource-card">
<h3>Books</h3>
<ul>
<li>"Eloquent JavaScript" by Marijn Haverbeke</li>
<li>"Python Crash Course" by Eric Matthes</li>
<li>"Clean Code" by Robert C. Martin</li>
<li>"Head First Java" by Kathy Sierra & Bert Bates</li>
</ul>
</div>
</div>
</section>
</main>
<footer>
<div class="footer-content">
<div class="footer-logo">
<h2>CodeFoundations</h2>
<p>Your journey to programming mastery starts here</p>
</div>
<div class="footer-links">
<h3>Quick Links</h3>
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#concepts">Core Concepts</a></li>
<li><a href="#languages">Languages</a></li>
<li><a href="#tools">Tools</a></li>
<li><a href="#resources">Resources</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>© 2025 CodeFoundations. All rights reserved.</p>
</div>
</footer>
<script src="script.js"></script>
</body>
</html>
css Copy code
/* Base Styles */
:root {
--primary-color: #4361ee;
--secondary-color: #3a0ca3;
--accent-color: #7209b7;
--text-color: #333;
--bg-color: #fff;
--card-bg: #f8f9fa;
--code-bg: #282c34;
--code-color: #abb2bf;
--header-bg: #fff;
--footer-bg: #f8f9fa;
--border-color: #e0e0e0;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
}
.dark-theme {
--primary-color: #4cc9f0;
--secondary-color: #4895ef;
--accent-color: #7209b7;
--text-color: #f8f9fa;
--bg-color: #121212;
--card-bg: #1e1e1e;
--code-bg: #1e1e1e;
--code-color: #abb2bf;
--header-bg: #1e1e1e;
--footer-bg: #1e1e1e;
--border-color: #333;
--shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: var(--text-color);
background-color: var(--bg-color);
transition: var(--transition);
}
a {
text-decoration: none;
color: var(--primary-color);
}
ul {
list-style: none;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
.btn {
display: inline-block;
background-color: var(--primary-color);
color: white;
padding: 0.8rem 1.5rem;
border-radius: 5px;
transition: var(--transition);
}
.btn:hover {
background-color: var(--secondary-color);
transform: translateY(-2px);
}
/* Header */
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
background-color: var(--header-bg);
box-shadow: var(--shadow);
position: sticky;
top: 0;
z-index: 100;
}
.logo h1 {
font-size: 1.5rem;
color: var(--primary-color);
}
nav ul {
display: flex;
}
nav ul li {
margin-left: 1.5rem;
}
nav ul li a {
color: var(--text-color);
transition: var(--transition);
}
nav ul li a:hover {
color: var(--primary-color);
}
.theme-toggle {
cursor: pointer;
font-size: 1.2rem;
color: var(--text-color);
}
/* Hero Section */
#hero {
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
color: white;
text-align: center;
padding: 5rem 2rem;
}
.hero-content h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
}