Contact Us International School Template
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Contact Us | Oakwood International School</title> <!-- Fonts: Merriweather (Academic) + Nunito (Friendly/Readable) --> <link href="https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Nunito:wght@400;600;700&display=swap" rel="stylesheet"> <!-- Icons --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <body> <!-- Hero Section --> <header class="hero"> <h1>Welcome to Oakwood</h1> <p>Shaping the leaders of tomorrow. Reach out to us for admissions, general inquiries, or campus tours.</p> </header> <!-- Floating Info Cards --> <div class="info-cards-container"> <div class="info-card" style="transition-delay: 0.1s;"> <i class="fas fa-user-graduate"></i> <h3>Admissions Office</h3> <p>admissions@oakwood.edu<br>+1 (555) 123-4567</p> </div> <div class="info-card" style="transition-delay: 0.3s;"> <i class="fas fa-school"></i> <h3>General Enquiries</h3> <p>info@oakwood.edu<br>+1 (555) 987-6543</p> </div> <div class="info-card" style="transition-delay: 0.5s;"> <i class="fas fa-map-marked-alt"></i> <h3>Campus Location</h3> <p>789 Education Lane<br>Knowledge City, ST 12345</p> </div> </div> <!-- Main Content Area --> <main class="main-container"> <!-- Left: FAQ Section --> <div class="faq-section reveal"> <h2>Frequently Asked<br>Questions</h2> <div class="accordion-item"> <div class="accordion-header"> What are the admission requirements? <i class="fas fa-chevron-down"></i> </div> <div class="accordion-body"> <p>Students must submit previous academic records, a birth certificate, and clear our basic entrance assessment. Interviews are conducted for middle and high school applicants.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> Do you offer school transportation? <i class="fas fa-chevron-down"></i> </div> <div class="accordion-body"> <p>Yes, we have a fleet of AC buses covering a 20-mile radius. Routes and fees are available at the administration desk.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> What is the student-to-teacher ratio? <i class="fas fa-chevron-down"></i> </div> <div class="accordion-body"> <p>We maintain a strict 20:1 student-to-teacher ratio to ensure personalized attention for every child's academic growth.</p> </div> </div> <div class="accordion-item"> <div class="accordion-header"> Are extracurricular activities included? <i class="fas fa-chevron-down"></i> </div> <div class="accordion-body"> <p>Absolutely. We offer sports, robotics, music, arts, and debate clubs as part of our holistic development curriculum.</p> </div> </div> </div> <!-- Right: Inquiry Form --> <div class="form-section reveal"> <h2>Online Inquiry</h2> <p>Fill out the form below and our academic counselor will get back to you within 24 hours.</p> <form id="schoolForm"> <div class="form-grid"> <div class="input-group"> <input type="text" id="parentName" required> <label for="parentName">Your Name</label> </div> <div class="input-group"> <input type="tel" id="phone" required> <label for="phone">Phone Number</label> </div> </div> <div class="form-grid"> <div class="input-group"> <input type="email" id="email" required> <label for="email">Email Address</label> </div> <div class="input-group"> <select id="inquiryType" required> <option value="" disabled selected hidden>Nature of Inquiry</option> <option value="admission">New Admission</option> <option value="general">General Question</option> <option value="careers">Careers / Job</option> <option value="feedback">Feedback / Complaint</option> </select> </div> </div> <!-- SMART FIELD: Only visible if "New Admission" is selected --> <div id="gradeBox"> <div class="input-group"> <select id="gradeSelect"> <option value="" disabled selected hidden>Select Grade / Class</option> <option value="kindergarten">Kindergarten (Pre-K to KG)</option> <option value="primary">Primary (Grade 1 to 5)</option> <option value="middle">Middle School (Grade 6 to 8)</option> <option value="high">High School (Grade 9 to 12)</option> </select> </div> </div> <div class="input-group" style="margin-bottom: 25px;"> <textarea id="message" required></textarea> <label for="message">Type your message here...</label> </div> <button type="submit" class="btn-submit" id="submitBtn"> Submit Inquiry <i class="fas fa-paper-plane"></i> </button> </form> </div> </main> </body> </html>
CSS
/* --- CSS VARIABLES --- */ :root { --primary-blue: #0F2C59; /* Academic Navy */ --accent-yellow: #F8B500; /* Excellence Gold */ --bg-light: #F4F7F6; --text-dark: #333333; --text-gray: #666666; --white: #ffffff; --box-shadow: 0 15px 35px rgba(15, 44, 89, 0.1); --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Nunito', sans-serif; background-color: var(--bg-light); color: var(--text-dark); overflow-x: hidden; } h1, h2, h3 { font-family: 'Merriweather', serif; color: var(--primary-blue); } /* --- HERO SECTION --- */ .hero { position: relative; height: 55vh; background: linear-gradient(rgba(15, 44, 89, 0.85), rgba(15, 44, 89, 0.85)), url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 20px; } .hero h1 { color: var(--white); font-size: 3.5rem; margin-bottom: 15px; animation: slideDown 1s ease forwards; } .hero p { color: #E0E0E0; font-size: 1.2rem; max-width: 600px; animation: slideUp 1s ease forwards 0.3s; opacity: 0; } /* --- INFO CARDS (Overlapping Hero) --- */ .info-cards-container { max-width: 1200px; margin: -80px auto 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 0 20px; position: relative; z-index: 10; } .info-card { background: var(--white); padding: 30px; border-radius: 12px; box-shadow: var(--box-shadow); text-align: center; transition: var(--transition); border-bottom: 4px solid transparent; opacity: 0; transform: translateY(30px); } .info-card.active { opacity: 1; transform: translateY(0); } .info-card:hover { transform: translateY(-10px); border-bottom: 4px solid var(--accent-yellow); } .info-card i { font-size: 2.5rem; color: var(--accent-yellow); margin-bottom: 15px; background: rgba(248, 181, 0, 0.1); width: 70px; height: 70px; line-height: 70px; border-radius: 50%; transition: var(--transition); } .info-card:hover i { background: var(--primary-blue); color: var(--white); } .info-card h3 { font-size: 1.2rem; margin-bottom: 10px; } .info-card p { color: var(--text-gray); font-size: 0.95rem; } /* --- MAIN CONTENT (Form & FAQ) --- */ .main-container { max-width: 1200px; margin: 60px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; } /* --- LEFT: FAQ ACCORDION --- */ .faq-section h2 { margin-bottom: 30px; font-size: 2rem; } .accordion-item { background: var(--white); border-radius: 8px; margin-bottom: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); overflow: hidden; } .accordion-header { padding: 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--primary-blue); transition: var(--transition); } .accordion-header:hover { color: var(--accent-yellow); } .accordion-header i { transition: transform 0.3s ease; } .accordion-item.open .accordion-header i { transform: rotate(180deg); color: var(--accent-yellow); } .accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; background: #FAFAFA; } .accordion-body p { padding: 0 20px 20px; color: var(--text-gray); font-size: 0.95rem; line-height: 1.6; } /* --- RIGHT: SMART CONTACT FORM --- */ .form-section { background: var(--white); padding: 40px; border-radius: 15px; box-shadow: var(--box-shadow); position: relative; border-top: 5px solid var(--primary-blue); } .form-section h2 { margin-bottom: 10px; } .form-section > p { color: var(--text-gray); margin-bottom: 30px; } .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; } .input-group { position: relative; width: 100%; } .input-group input, .input-group select, .input-group textarea { width: 100%; padding: 15px; border: 2px solid #E5E7EB; border-radius: 8px; background: #F9FAFB; font-family: 'Nunito', sans-serif; font-size: 1rem; color: var(--text-dark); outline: none; transition: var(--transition); } .input-group textarea { height: 120px; resize: none; } .input-group input:focus, .input-group select:focus, .input-group textarea:focus { border-color: var(--primary-blue); background: var(--white); box-shadow: 0 0 0 4px rgba(15, 44, 89, 0.1); } /* Floating Label Setup */ .input-group label { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9CA3AF; pointer-events: none; transition: var(--transition); background: transparent; } .input-group textarea ~ label { top: 25px; } /* Label float animation */ .input-group input:focus ~ label, .input-group input:valid ~ label, .input-group textarea:focus ~ label, .input-group textarea:valid ~ label { top: 0; left: 10px; font-size: 0.8rem; color: var(--primary-blue); background: var(--white); padding: 0 5px; font-weight: 600; } /* Smart Field: Hidden by default */ #gradeBox { max-height: 0; overflow: hidden; opacity: 0; transition: all 0.5s ease; grid-column: span 2; } #gradeBox.show { max-height: 100px; opacity: 1; margin-bottom: 20px; } .btn-submit { width: 100%; background: var(--primary-blue); color: var(--white); border: none; padding: 16px; font-size: 1.1rem; font-weight: 700; border-radius: 8px; cursor: pointer; transition: var(--transition); display: flex; justify-content: center; align-items: center; gap: 10px; } .btn-submit:hover { background: var(--accent-yellow); color: var(--primary-blue); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(248, 181, 0, 0.3); } /* --- ANIMATIONS --- */ @keyframes slideDown { from { opacity: 0; transform: translateY(-40px); } to { opacity: 1; transform: translateY(0); } } @keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } } .reveal { opacity: 0; transform: translateY(50px); transition: 0.8s ease; } .reveal.active { opacity: 1; transform: translateY(0); } /* --- RESPONSIVE --- */ @media (max-width: 992px) { .info-cards-container { grid-template-columns: 1fr; margin-top: 30px; } .hero { height: auto; padding: 100px 20px 40px; } .main-container { grid-template-columns: 1fr; } } @media (max-width: 768px) { .hero h1 { font-size: 2.5rem; } .form-grid { grid-template-columns: 1fr; } #gradeBox.show { grid-column: span 1; } }
JavaScript
window.addEventListener('load', () => { const cards = document.querySelectorAll('.info-card'); cards.forEach(card => { setTimeout(() => { card.classList.add('active'); }, 100); }); }); // 2. Scroll Reveal using Intersection Observer const observer = new IntersectionObserver((entries) => { entries.forEach(entry => { if(entry.isIntersecting) { entry.target.classList.add('active'); } }); }, { threshold: 0.1 }); document.querySelectorAll('.reveal').forEach(el => observer.observe(el)); // 3. FAQ Accordion Logic const accordions = document.querySelectorAll('.accordion-header'); accordions.forEach(acc => { acc.addEventListener('click', function() { const item = this.parentElement; const body = this.nextElementSibling; // Close all others document.querySelectorAll('.accordion-item').forEach(otherItem => { if(otherItem !== item) { otherItem.classList.remove('open'); otherItem.querySelector('.accordion-body').style.maxHeight = null; } }); // Toggle Current if (item.classList.contains('open')) { item.classList.remove('open'); body.style.maxHeight = null; } else { item.classList.add('open'); body.style.maxHeight = body.scrollHeight + "px"; } }); }); // 4. Smart Conditional Form Logic const inquiryType = document.getElementById('inquiryType'); const gradeBox = document.getElementById('gradeBox'); const gradeSelect = document.getElementById('gradeSelect'); inquiryType.addEventListener('change', function() { // Fix color of select element this.style.color = "var(--text-dark)"; // Show/Hide logic if(this.value === 'admission') { gradeBox.classList.add('show'); gradeSelect.setAttribute('required', 'true'); } else { gradeBox.classList.remove('show'); gradeSelect.removeAttribute('required'); gradeSelect.value = ""; // reset value } }); // Color fix for Grade Select gradeSelect.addEventListener('change', function() { this.style.color = "var(--text-dark)"; }); // 5. Form Submit Animation document.getElementById('schoolForm').addEventListener('submit', function(e) { e.preventDefault(); const btn = document.getElementById('submitBtn'); const ogText = btn.innerHTML; // Loading btn.innerHTML = 'Sending Details... <i class="fas fa-circle-notch fa-spin"></i>'; btn.style.opacity = '0.8'; btn.style.pointerEvents = 'none'; // Simulate Network Request setTimeout(() => { btn.innerHTML = 'Sent Successfully! <i class="fas fa-check-circle"></i>'; btn.style.background = '#10B981'; // Success Green btn.style.color = 'white'; this.reset(); gradeBox.classList.remove('show'); inquiryType.style.color = ""; gradeSelect.style.color = ""; setTimeout(() => { btn.innerHTML = ogText; btn.style.background = ''; btn.style.color = ''; btn.style.pointerEvents = 'auto'; btn.style.opacity = '1'; }, 4000); }, 2000); });
Output Preview
Desktop
Mobile
Fullscreen