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>My First Website</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
<nav>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Contact</a>
</nav>
</header>
<main>
<section>
<h2>About Me</h2>
<p>This is a short paragraph about me and my website.</p>
</section>
</main>
<footer>
<p>© 2026 My Website</p>
</footer>
</body>
</html>
2. Add Styling with CSS
CSS makes your site look nice. Save this as style.css in the same folder:
Css
Copy code
body {
font-family: Arial, sans-serif;
margin: 0;
background-color: #f4f4f4;
}
header {
background: #333;
color: white;
padding: 1rem;
text-align: center;
}
nav a {
color: white;
margin: 0 10px;
text-decoration: none;
}
nav a:hover {
text-decoration: underline;
}
main {
padding: 20px;
}
footer {
background: #333;
color: white;
text-align: center;
padding: 10px;
}
3. Add Interactivity with JavaScript (Optional)
If you want to make it interactive, create a script.js file:
Javascript
Copy code
document.addEventListener("DOMContentLoaded", () => {
alert("Welcome to my website!");
});
Then link it in your HTML before </body>:
Html
Copy code
<script src="script.js"></script>
4. View Your Website
Save all files in the same folder.
Open index.html in your browser.
You now have a basic coded website!
USE Command Prompt app
Open the Main CMD App
Press Windows + R, type cmd, and hit Enter.
This opens the standard black Command Prompt window.
2. Navigate to Where You Want Your Website Files
Example: if you want them on your Desktop: