0% found this document useful (0 votes)
30 views

Static Web Using HTML Css Java

Uploaded by

Aisha Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Static Web Using HTML Css Java

Uploaded by

Aisha Saeed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Powered by AI

Copilot

Certainly! Creating a static website using HTML is a great way to get started. Let’s break it down into steps:

1. HTML (Hypertext Markup Language): This is the foundation of any web page. It defines the structure
and content of your site. Here’s a basic example of an HTML page:
<!DOCTYPE html>
<html>
<head>
<title>My Static Website</title>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a simple static webpage created with HTML.</p>
</body>
</html>

1. CSS (Cascading Style Sheets): CSS allows you to style your web page. You can change fonts, colors,
layout, and more. Here’s how you can add some basic styling to the previous example:
<!DOCTYPE html>
<html>
<head>
<title>My Static Website</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
h1 {
color: #333;
}
p {
font-size: 16px;
}
</style>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a simple static webpage created with HTML and CSS.</p>
</body>
</html>

1. JavaScript: While optional for a static site, JavaScript can add interactivity. For instance, you can create
a simple image slideshow or validate user input. Here’s a basic example:
<!DOCTYPE html>
<html>
<head>
<title>My Static Website</title>
<style>
/* Your CSS styles here */
</style>
<script>
function greetUser() {
alert("Hello, visitor!");
}
</script>
</head>
<body>
<h1>Welcome to My Website</h1>
<p>This is a simple static webpage created with HTML, CSS, and JavaScript.</p>
<button onclick="greetUser()">Click me!</button>
</body>
</html>
1. Hosting: To make your website accessible online, you’ll need a hosting service. You can use platforms
like GitHub Pages, Netlify, or W3Schools Spaces (where you can build static sites directly in your
browser) . These services allow you to upload your HTML, CSS, and JavaScript files.

Remember, static websites are quick to create, cost-effective to host, and secure. So go ahead, start building
your own static site today! 🚀

You might also like