Creating Your Own Website Using HTML
Creating Your Own Website Using HTML
Here's a
simple step-by-step guide to get you started:
o Make a folder on your computer to organize your website files (e.g., MyWebsite).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
padding: 0;
header {
background-color: #4CAF50;
color: white;
text-align: center;
padding: 1em 0;
}
nav {
text-align: center;
margin: 20px 0;
nav a {
margin: 0 15px;
text-decoration: none;
color: #4CAF50;
footer {
background-color: #4CAF50;
color: white;
text-align: center;
padding: 1em 0;
position: absolute;
bottom: 0;
width: 100%;
</style>
</head>
<body>
<header>
<h1>Welcome to My Website</h1>
</header>
<nav>
<a href="#">Home</a>
<a href="#">About</a>
<a href="#">Contact</a>
</nav>
<main>
<section>
<h2>About Me</h2>
</section>
</main>
<footer>
</footer>
</body>
</html>
2. Double-click it to open it in your web browser. You’ll see your first website!
3. <nav>
4. <a href="index.html">Home</a>
5. <a href="about.html">About</a>
6. <a href="contact.html">Contact</a>
7. </nav>
Save your images in the same folder as your HTML files or in a subfolder like images/.
6. <audio controls>
7. <source src="audio.mp3" type="audio/mpeg">
8. </audio>
5. body {
6. background-color: #f4f4f9;
7. color: #333;
9. }
2. Follow their guides to upload your files and make your site accessible online.
If you'd like a more advanced or interactive website, you can learn JavaScript and frameworks like
Bootstrap to enhance functionality and design!
Hosting your website for free is a great option for personal projects or learning purposes. Here's how
you can do it:
1. GitHub Pages
GitHub Pages is a free and reliable way to host static websites (HTML, CSS, and JavaScript).
Steps:
2. Create a Repository:
o Go to your GitHub dashboard, click "New Repository", and name it (e.g., my-
website).
o Make it public.
o Drag and drop your HTML, CSS, and other files into the repository or use Git to push
them from your computer.
2. Netlify
Netlify offers free hosting for static websites with custom domains.
Steps:
1. Create an Account:
o Sign up at Netlify.
o Drag and drop your project folder (containing index.html) into Netlify's dashboard.
3. Deploy:
o Netlify will automatically create a URL for your website, such as https://your-site-
name.netlify.app.
3. Vercel
Vercel is another great option, particularly for projects involving JavaScript frameworks like React.
Steps:
1. Create an Account:
o Sign up at Vercel.
o Drag and drop your folder into Vercel's dashboard or use GitHub/GitLab/Bitbucket
integration to deploy directly.
3. Deploy:
Steps:
2. Share Publicly:
o Use tools like Google Drive Direct Link Generator to create a link to your website.
5. Firebase Hosting
Firebase is a free hosting option from Google, ideal for small projects and static websites.
Steps:
2. Initialize Firebase:
o Login to Firebase:
o firebase login
o firebase init
3. Deploy:
o Run:
o firebase deploy
• InfinityFree (infinityfree.net)
Offers free hosting with custom domains and no ads.
• 000WebHost (000webhost.com)
Provides free hosting with easy setup.
If you're just starting, GitHub Pages is the simplest and most reliable option for static websites. If you
need custom domains or advanced features, try Netlify or Vercel.