đ§± Making website with HTML and CSS (Beginnerâfriendly tutorial)
Wantâto build your very own website from scratch? No worries! In this tutorial thatâs perfect for beginners, weâll show you how to create a minimalistic andânice-looking website using only HTML and CSS â no need for any libraries, deepen knowledge of CSS or learning some advanced new framework since sometimes all you want is just some basics!
â What You'll Learn:
- How do you organizeâa website folder structure
- Writing your first HTML page
- Styling the page with CSS
- Inserting pictures,âlinks, and layout
- Making it mobile-friendly
- Save and open inâa browser
đ§âStep 1: Prepare Your Project Folder
On your desktop, make aânew folder. Name it:
MyFirstWebsite
Within that folder, you need toâcreate two files:
index.html
style.css
Your folderâstructure should now look like the following:
MyFirstWebsite/
âââ index.html
âââ style.css
đ§Ÿ Step 2:âWriting Your First HTML Page
Open index.html
in a code editor (could be VS Code,âNotepad++ or even Notepad).
Paste the following code:
<!DOCTYPE html>
<html>
<head>
<title>My First Website</title>
</head>
<body>
<h1>Welcome to My First Website</h1>
<p>Learn HTML & CSS in an easy way!</p>
<nav>
Home About Contact
</nav>
<h2>Hello, I'm Jane! :)</h2>
<p>Hello friends! learning HTML and CSS step by step!!!</p>
<p>Hello, I'm Jane! :) Hello, I am Jane! :) Let's learn HTML and CSS from scratch together!</p>
<footer>
© 2025 MyFirstWebsite.com
</footer>
</body>
</html>
đš Step 3: Add Style with CSS
Open style.css
and paste this:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Arial', sans-serif;
}
body {
background: #f4f4f4;
color: #333;
line-height: 1.6;
padding: 20px;
}
header {
background: #4CAF50;
color: white;
padding: 20px 0;
text-align: center;
}
nav {
background: #333;
padding: 10px 0;
text-align: center;
}
nav a {
color: white;
margin: 0 15px;
text-decoration: none;
font-weight: bold;
}
nav a:hover {
text-decoration: underline;
}
main {
background: white;
padding: 20px;
margin-top: 20px;
border-radius: 5px;
}
footer {
text-align: center;
padding: 10px;
margin-top: 20px;
background: #222;
color: white;
}
đ Step 4: Open in Browser
- Right-click on
index.html
- Clickâ"Open with" > Your Browser (Chrome, etc.)
- đ Boom! Your first site is alive â locallyâon your own computer!
đ± Bonus: Make It Responsive
If you want to make sure your website looksâfine in mobile too, just add this line in your <head>
:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
And add this to style.css
at the bottom:
@media (max-width: 600px) {
body {
padding: 10px;
}
nav a {
display: block;
margin: 10px 0;
}
}
â Final Tips:
- You can host this siteâfor free on GitHub Pages
- Use free tools like Favicon.io to generate a site icon
- Youâcan always add pictures, forms or JavaScript later.
đ You Did It!
If you completed each and every step, congratulationsââ you have built your first website! Keep learning and addâmore features along the way.
No comments:
Post a Comment