Write code for a basic ai company landing page with js, css and html
- User
Write code for a basic ai company landing page with js, css and html
- Assistant
Write code for a basic ai company landing page with js, css and html
Creating a basic AI company landing page involves structuring your content with HTML, styling it with CSS, and adding interactivity with JavaScript. Below is a simple example that you can use as a foundation for your landing page. This example includes a header, hero section, features section, about section, and a footer.
ai-company-landing-page/
│
├── index.html
├── styles.css
└── script.js
index.html)<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Solutions Company</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Header -->
<header>
<div class="container">
<h1 class="logo">AI Solutions</h1>
<nav>
<ul class="nav-links">
<li><a href="#home">Home</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
<div class="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</div>
</header>
<!-- Hero Section -->
<section id="home" class="hero">
<div class="container">
<h2>Transforming Your Business with AI</h2>
<p>Innovative AI solutions tailored to your needs.</p>
<a href="#contact" class="btn">Get Started</a>
</div>
</section>
<!-- Features Section -->
<section id="features" class="features">
<div class="container">
<h2>Our Features</h2>
<div class="feature-grid">
<div class="feature">
<h3>Machine Learning</h3>
<p>Implementing advanced algorithms to improve your operations.</p>
</div>
<div class="feature">
<h3>Data Analytics</h3>
<p>Turning data into actionable insights for better decision-making.</p>
</div>
<div class="feature">
<h3>Natural Language Processing</h3>
<p>Enhancing communication between humans and machines.</p>
</div>
</div>
</div>
</section>
<!-- About Section -->
<section id="about" class="about">
<div class="container">
<h2>About Us</h2>
<p>AI Solutions is dedicated to providing cutting-edge artificial intelligence technologies to help businesses thrive in the digital age. Our team of experts specializes in developing customized AI strategies that drive efficiency, innovation, and growth.</p>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="contact">
<div class="container">
<h2>Contact Us</h2>
<form id="contact-form">
<input type="text" placeholder="Your Name" required>
<input type="email" placeholder="Your Email" required>
<textarea placeholder="Your Message" rows="5" required></textarea>
<button type="submit" class="btn">Send Message</button>
</form>
</div>
</section>
<!-- Footer -->
<footer>
<div class="container">
<p>© 2023 AI Solutions. All rights reserved.</p>
<div class="social-links">
<a href="#"><img src="icons/facebook.svg" alt="Facebook"></a>
<a href="#"><img src="icons/twitter.svg" alt="Twitter"></a>
<a href="#"><img src="icons/linkedin.svg" alt="LinkedIn"></a>
</div>
</div>
</footer>
<script src="script.js"></script>
</body>
</html>
styles.css)script.js)// Toggle Hamburger Menu
const hamburger = document.querySelector('.hamburger');
const navLinks = document.querySelector('.nav-links');
hamburger.addEventListener('click', () => {
navLinks.classList.toggle('active');
hamburger.classList.toggle('toggle');
});
// Handle Form Submission
const contactForm = document.getElementById('contact-form');
contactForm.addEventListener('submit', function(e) {
e.preventDefault();
// Basic form validation or AJAX submission can be added here
alert('Thank you for contacting us!');
contactForm.reset();
});
Assets: Ensure you have the necessary images and icons.
'images/hero-bg.jpg' in the CSS with the path to your hero section background image.facebook.svg, twitter.svg, linkedin.svg) inside an icons folder or adjust the paths accordingly.Responsive Design: The CSS includes basic responsiveness for smaller screens, including a hamburger menu toggle. You can enhance this further based on your needs.
Enhancements:
Optimization:
Accessibility:
aria attributes where necessary.ai-company-landing-page.index.html, styles.css, and script.js files with the code provided above.index.html in your preferred web browser to see the landing page in action.This basic template should give you a solid starting point for your AI company's landing page. From here, you can expand and customize it further to better fit your specific needs.
Not yet included in a published release.
/* Reset & Basic Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
line-height: 1.6;
color: #333;
}
.container {
width: 90%;
max-width: 1200px;
margin: auto;
overflow: hidden;
}
/* Header */
header {
background: #007BFF;
color: #fff;
padding: 20px 0;
position: fixed;
width: 100%;
top: 0;
z-index: 1000;
}
header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5em;
}
nav ul {
list-style: none;
display: flex;
}
nav ul li {
margin-left: 20px;
}
nav ul li a {
color: #fff;
text-decoration: none;
font-weight: bold;
transition: color 0.3s ease;
}
nav ul li a:hover {
color: #FFD700;
}
/* Hamburger Menu */
.hamburger {
display: none;
flex-direction: column;
cursor: pointer;
}
.hamburger span {
height: 3px;
width: 25px;
background: #fff;
margin-bottom: 4px;
border-radius: 5px;
}
/* Hero Section */
.hero {
background: url('images/hero-bg.jpg') no-repeat center center/cover;
height: 100vh;
display: flex;
align-items: center;
color: #fff;
text-align: center;
padding-top: 80px;
}
.hero h2 {
font-size: 3em;
margin-bottom: 20px;
}
.hero p {
font-size: 1.2em;
margin-bottom: 30px;
}
.btn {
background: #FFD700;
color: #333;
padding: 10px 20px;
text-decoration: none;
border-radius: 5px;
font-weight: bold;
transition: background 0.3s ease;
}
.btn:hover {
background: #e5c100;
}
/* Features Section */
.features {
padding: 60px 0;
background: #f4f4f4;
}
.features h2 {
text-align: center;
margin-bottom: 40px;
}
.feature-grid {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.feature {
background: #fff;
padding: 20px;
margin: 10px;
flex-basis: 30%;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
transition: transform 0.3s ease;
}
.feature:hover {
transform: translateY(-10px);
}
.feature h3 {
margin-bottom: 15px;
color: #007BFF;
}
/* About Section */
.about {
padding: 60px 0;
text-align: center;
}
.about h2 {
margin-bottom: 20px;
}
.about p {
max-width: 800px;
margin: auto;
font-size: 1.1em;
}
/* Contact Section */
.contact {
padding: 60px 0;
background: #f4f4f4;
}
.contact h2 {
text-align: center;
margin-bottom: 30px;
}
#contact-form {
max-width: 600px;
margin: auto;
display: flex;
flex-direction: column;
}
#contact-form input,
#contact-form textarea {
padding: 10px;
margin-bottom: 15px;
border: none;
border-radius: 5px;
}
#contact-form button {
align-self: flex-end;
}
/* Footer */
footer {
background: #333;
color: #fff;
padding: 20px 0;
text-align: center;
}
.footer .social-links a {
margin: 0 10px;
}
.social-links img {
width: 20px;
height: 20px;
filter: invert(100%);
transition: filter 0.3s ease;
}
.social-links a:hover img {
filter: invert(50%) sepia(100%) hue-rotate(200deg) saturate(500%);
}
/* Responsive */
@media (max-width: 768px) {
nav ul {
flex-direction: column;
position: absolute;
top: 70px;
left: -100%;
width: 100%;
background: #007BFF;
transition: left 0.3s ease;
}
nav ul.active {
left: 0;
}
nav ul li {
margin: 15px 0;
text-align: center;
}
.hamburger {
display: flex;
}
.feature-grid {
flex-direction: column;
align-items: center;
}
.feature {
flex-basis: 80%;
}
}