0% found this document useful (0 votes)
9 views42 pages

Simple HTML Website Structure

The document outlines the structure of a simple website built using HTML, CSS, and JavaScript, featuring a header with navigation links, sections for a hero message, about information, services offered, and a contact form. It includes styling for various elements such as the header, sections, buttons, and forms to enhance the user interface. Additionally, there is a JavaScript file referenced for potential interactivity, although its content is not fully provided.
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)
9 views42 pages

Simple HTML Website Structure

The document outlines the structure of a simple website built using HTML, CSS, and JavaScript, featuring a header with navigation links, sections for a hero message, about information, services offered, and a contact form. It includes styling for various elements such as the header, sections, buttons, and forms to enhance the user interface. Additionally, there is a JavaScript file referenced for potential interactivity, although its content is not fully provided.
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

Html

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>My Awesome Website</title>

<link rel="stylesheet" href="[Link]">

</head>

<body>

<header>

<nav>

<div class="logo">My Logo</div>

<ul>

<li><a href="#">Home</a></li>

<li><a href="#">About</a></li>

<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>

</ul>

</nav>

</header>

<main>

<section id="hero">

<div class="hero-content">

<h1>Welcome to My Website!</h1>

<p>This is a simple website built with HTML, CSS, and JavaScript.</p>

<a href="#" class="button">Learn More</a>

</div>

</section>

<section id="about">

<h2>About Us</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

<img src="[Link]" alt="About Us Image"> <!-- Replace with your image -->

</section>

<section id="services">

<h2>Our Services</h2>

<div class="service-container">

<div class="service">

<img src="[Link]" alt="Service 1"> <!-- Replace with your icon -->

<h3>Service 1</h3>

<p>Description of service 1.</p>

</div>

<div class="service">

<img src="[Link]" alt="Service 2"> <!-- Replace with your icon -->

<h3>Service 2</h3>

<p>Description of service 2.</p>

</div>

<div class="service">
<img src="[Link]" alt="Service 3"> <!-- Replace with your icon -->

<h3>Service 3</h3>

<p>Description of service 3.</p>

</div>

</div>

</section>

<section id="contact">

<h2>Contact Us</h2>

<form id="contact-form">

<label for="name">Name:</label>

<input type="text" id="name" name="name" required><br><br>

<label for="email">Email:</label>

<input type="email" id="email" name="email" required><br><br>

<label for="message">Message:</label>
<textarea id="message" name="message" rows="4" required></textarea><br><br>

<button type="submit">Submit</button>

</form>

</section>

</main>

<footer>

<p>&copy; 2023 My Awesome <!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>My Awesome Website</title>

<link rel="stylesheet" href="[Link]">

</head>

<body>
<header>

<nav>

<div class="logo">My Logo</div>

<ul>

<li><a href="#">Home</a></li>

<li><a href="#">About</a></li>

<li><a href="#">Services</a></li>

<li><a href="#">Contact</a></li>

</ul>

</nav>

</header>

<main>

<section id="hero">

<div class="hero-content">

<h1>Welcome to My Website!</h1>

<p>This is a simple website built with HTML, CSS, and JavaScript.</p>


<a href="#" class="button">Learn More</a>

</div>

</section>

<section id="about">

<h2>About Us</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

<img src="[Link]" alt="About Us Image"> <!-- Replace with your image -->

</section>

<section id="services">

<h2>Our Services</h2>

<div class="service-container">

<div class="service">

<img src="[Link]" alt="Service 1"> <!-- Replace with your icon -->

<h3>Service 1</h3>

<p>Description of service 1.</p>


</div>

<div class="service">

<img src="[Link]" alt="Service 2"> <!-- Replace with your icon -->

<h3>Service 2</h3>

<p>Description of service 2.</p>

</div>

<div class="service">

<img src="[Link]" alt="Service 3"> <!-- Replace with your icon -->

<h3>Service 3</h3>

<p>Description of service 3.</p>

</div>

</div>

</section>

<section id="contact">

<h2>Contact Us</h2>

<form id="contact-form">
<label for="name">Name:</label>

<input type="text" id="name" name="name" required><br><br>

<label for="email">Email:</label>

<input type="email" id="email" name="email" required><br><br>

<label for="message">Message:</label>

<textarea id="message" name="message" rows="4" required></textarea><br><br>

<button type="submit">Submit</button>

</form>

</section>

</main>

<footer>

<p>&copy; 2023 My Awesome Website</p>

</footer>
<script src="[Link]"></script>

</body>

</html>Website</p>

</footer>

<script src="[Link]"></script>

</body>

</html>

Css

/* [Link] */

/* General Styles */

body {

font-family: sans-serif;

margin: 0;
padding: 0;

line-height: 1.6;

a{

text-decoration: none;

color: #333;

/* Header Styles */

header {

background-color: #f0f0f0;

padding: 10px 0;

nav {

display: flex;

justify-content: space-between;
align-items: center;

max-width: 1200px;

margin: 0 auto;

padding: 0 20px;

nav ul {

list-style: none;

display: flex;

nav ul li {

margin-left: 20px;

nav ul li a {

padding: 8px 12px;


border-radius: 5px;

transition: background-color 0.3s ease;

nav ul li a:hover {

background-color: #ddd;

.logo {

font-size: 1.5em;

font-weight: bold;

/* Hero Section Styles */

#hero {

background-color: #e0e0e0;

padding: 100px 0;

text-align: center;
}

.hero-content {

max-width: 800px;

margin: 0 auto;

.button {

display: inline-block;

background-color: #4CAF50;

color: white;

padding: 12px 24px;

border-radius: 5px;

margin-top: 20px;

transition: background-color 0.3s ease;

}
.button:hover {

background-color: #3e8e41;

/* About Section Styles */

#about {

padding: 80px 0;

text-align: center;

#about img {

max-width: 500px;

margin-top: 20px;

/* Services Section Styles */

#services {

background-color: #f8f8f8;
padding: 80px 0;

text-align: center;

.service-container {

display: flex;

justify-content: space-around;

flex-wrap: wrap;

max-width: 1200px;

margin: 0 auto;

.service {

width: 300px;

padding: 20px;

margin-bottom: 30px;

border: 1px solid #ddd;


border-radius: 5px;

box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

.service img {

max-width: 100px;

margin-bottom: 10px;

/* Contact Section Styles */

#contact {

padding: 80px 0;

text-align: center;

#contact-form {

max-width: 600px;

margin: 0 auto;
padding: 20px;

#contact-form label {

display: block;

margin-bottom: 5px;

#contact-form input,

#contact-form textarea {

width: 100%;

padding: 10px;

margin-bottom: 15px;

border: 1px solid #ccc;

border-radius: 4px;

box-sizing: border-box; /* Important for padding */

}
#contact-form button {

background-color: #007bff;

color: white;

padding: 12px 20px;

border: none;

border-radius: 4px;

cursor: pointer;

transition: background-color 0.3s ease;

#contact-form but/* [Link] */

/* General Styles */

body {

font-family: sans-serif;

margin: 0;

padding: 0;
line-height: 1.6;

a{

text-decoration: none;

color: #333;

/* Header Styles */

header {

background-color: #f0f0f0;

padding: 10px 0;

nav {

display: flex;

justify-content: space-between;
align-items: center;

max-width: 1200px;

margin: 0 auto;

padding: 0 20px;

nav ul {

list-style: none;

display: flex;

nav ul li {

margin-left: 20px;

nav ul li a {

padding: 8px 12px;

border-radius: 5px;
transition: background-color 0.3s ease;

nav ul li a:hover {

background-color: #ddd;

.logo {

font-size: 1.5em;

font-weight: bold;

/* Hero Section Styles */

#hero {

background-color: #e0e0e0;

padding: 100px 0;

text-align: center;
}

.hero-content {

max-width: 800px;

margin: 0 auto;

.button {

display: inline-block;

background-color: #4CAF50;

color: white;

padding: 12px 24px;

border-radius: 5px;

margin-top: 20px;

transition: background-color 0.3s ease;

.button:hover {
background-color: #3e8e41;

/* About Section Styles */

#about {

padding: 80px 0;

text-align: center;

#about img {

max-width: 500px;

margin-top: 20px;

/* Services Section Styles */

#services {

background-color: #f8f8f8;
padding: 80px 0;

text-align: center;

.service-container {

display: flex;

justify-content: space-around;

flex-wrap: wrap;

max-width: 1200px;

margin: 0 auto;

.service {

width: 300px;

padding: 20px;

margin-bottom: 30px;

border: 1px solid #ddd;

border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

.service img {

max-width: 100px;

margin-bottom: 10px;

/* Contact Section Styles */

#contact {

padding: 80px 0;

text-align: center;

#contact-form {

max-width: 600px;

margin: 0 auto;
padding: 20px;

#contact-form label {

display: block;

margin-bottom: 5px;

#contact-form input,

#contact-form textarea {

width: 100%;

padding: 10px;

margin-bottom: 15px;

border: 1px solid #ccc;

border-radius: 4px;

box-sizing: border-box; /* Important for padding */

}
#contact-form button {

background-color: #007bff;

color: white;

padding: 12px 20px;

border: none;

border-radius: 4px;

cursor: pointer;

transition: background-color 0.3s ease;

#contact-form button:hover {

background-color: #0056b3;

/* Footer Styles */

footer {

background-color: #333;
color: white;

text-align: center;

pad/* [Link] */

/* General Styles */

body {

font-family: sans-serif;

margin: 0;

padding: 0;

line-height: 1.6;

a{

text-decoration: none;

color: #333;

/* Header Styles */
header {

background-color: #f0f0f0;

padding: 10px 0;

nav {

display: flex;

justify-content: space-between;

align-items: center;

max-width: 1200px;

margin: 0 auto;

padding: 0 20px;

nav ul {

list-style: none;

display: flex;
}

nav ul li {

margin-left: 20px;

nav ul li a {

padding: 8px 12px;

border-radius: 5px;

transition: background-color 0.3s ease;

nav ul li a:hover {

background-color: #ddd;

.logo {

font-size: 1.5em;
font-weight: bold;

/* Hero Section Styles */

#hero {

background-color: #e0e0e0;

padding: 100px 0;

text-align: center;

.hero-content {

max-width: 800px;

margin: 0 auto;

.button {

display: inline-block;
background-color: #4CAF50;

color: white;

padding: 12px 24px;

border-radius: 5px;

margin-top: 20px;

transition: background-color 0.3s ease;

.button:hover {

background-color: #3e8e41;

/* About Section Styles */

#about {

padding: 80px 0;

text-align: center;

}
#about img {

max-width: 500px;

margin-top: 20px;

/* Services Section Styles */

#services {

background-color: #f8f8f8;

padding: 80px 0;

text-align: center;

.service-container {

display: flex;

justify-content: space-around;

flex-wrap: wrap;

max-width: 1200px;
margin: 0 auto;

.service {

width: 300px;

padding: 20px;

margin-bottom: 30px;

border: 1px solid #ddd;

border-radius: 5px;

box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

.service img {

max-width: 100px;

margin-bottom: 10px;

/* Contact Section Styles */


#contact {

padding: 80px 0;

text-align: center;

#contact-form {

max-width: 600px;

margin: 0 auto;

padding: 20px;

#contact-form label {

display: block;

margin-bottom: 5px;

#contact-form input,
#contact-form textarea {

width: 100%;

padding: 10px;

margin-bottom: 15px;

border: 1px solid #ccc;

border-radius: 4px;

box-sizing: border-box; /* Important for padding */

#contact-form button {

background-color: #007bff;

color: white;

padding: 12px 20px;

border: none;

border-radius: 4px;

cursor: pointer;

transition: background-color 0.3s ease;

}
#contact-form button:hover {

background-color: #0056b3;

/* Footer Styles */

footer {

background-color: #333;

color: white;

text-align: center;

padding: 20px 0;

}ding: 20px 0;

}ton:hover {

background-color: #0056b3;

/* Footer Styles */
footer {

background-color: #333;

color: white;

text-align: center;

padding: 20px 0;

Javascript

// [Link]

[Link]('DOMContentLoaded', function() {

// Example: Form Submission Handling (Basic)

const contactForm = [Link]('contact-form');

if (contactForm) {

[Link]('submit', function(event) {

[Link](); // Prevent the default form submission


// Get form data

const name = [Link]('name').value;

const email = [Link]('email').value;

const message = [Link]('message').value;

// Basic validation (you should add more robust validation)

if (!name || !email || !message) {

alert("Please fill in all fields.");

return;

// You would typically send the form data to a server here

// using AJAX (e.g., fetch)

// For this example, we'll just log the data to the console.

[Link]("Form data:");
[Link]("Name:", name);

[Link]("Email:", email);

[Link]("Message:", message);

alert("Message sent! (Form submission is simulated in this example)");

// Optionally clear the form after submission

[Link]();

});

// Example: Smooth scrolling for navigation links (optional)

const navLinks = [Link]('nav a[href^="#"]');

[Link](link => {

[Link]('click', function(event) {

[Link]();
const targetId = [Link]('href');

const targetElement = [Link](targetId);

if (targetElement) {

[Link]({

behavior: 'smooth'

});

});

});

});

You might also like