<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Quran Classes 4 U Dev Notes]]></title><description><![CDATA[Quran Classes 4 U Dev Notes]]></description><link>https://quranclasses4u.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 21:13:56 GMT</lastBuildDate><atom:link href="https://quranclasses4u.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Creating a Responsive Online Quran Learning Website with HTML and CSS]]></title><description><![CDATA[Build a responsive Quran learning homepage with semantic HTML and modern CSS: sticky nav, hero, course cards, teacher profiles and a trial panel.]]></description><link>https://quranclasses4u.hashnode.dev/responsive-online-quran-learning-website</link><guid isPermaLink="true">https://quranclasses4u.hashnode.dev/responsive-online-quran-learning-website</guid><category><![CDATA[HTML]]></category><category><![CDATA[CSS]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[frontend]]></category><dc:creator><![CDATA[QuranClasses4u]]></dc:creator><pubDate>Fri, 04 Dec 2026 18:31:26 GMT</pubDate><content:encoded><![CDATA[<p>Educational websites have a clear job: help a visitor understand what is offered, trust the people offering it, and take one next step. In this article I'll walk through how to structure a responsive homepage for an online Quran learning academy using nothing but semantic HTML and modern CSS — no framework.</p>
<p>We'll build five sections:</p>
<ol>
<li>A sticky header with a mobile-friendly nav</li>
<li>A hero with a two-column layout that stacks on mobile</li>
<li>A course card grid</li>
<li>Teacher profile cards</li>
<li>A trial-class information panel</li>
</ol>
<h2>Design tokens first</h2>
<p>Before writing layout code, I define the palette and spacing as custom properties. Changing the theme later becomes a one-line edit.</p>
<pre><code class="language-css">:root {
  --green: #073d2e;
  --green-2: #0b5942;
  --gold: #d5ae59;
  --cream: #fbf8ef;
  --ink: #17372d;
  --muted: #687a71;
  --line: #e8e7df;
  --radius: 18px;
  --shadow: 0 14px 38px rgba(4, 42, 31, .12);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

.container { max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
</code></pre>
<p>Deep green and warm gold feel calm and traditional without being heavy, and both pass contrast checks against cream and white.</p>
<h2>1. Sticky header</h2>
<pre><code class="language-html">&lt;header class="site-header"&gt;
  &lt;nav class="container nav" aria-label="Main"&gt;
    &lt;a href="/" class="brand"&gt;Quran Academy&lt;/a&gt;
    &lt;button class="nav-toggle" aria-expanded="false" aria-controls="nav-links"&gt;Menu&lt;/button&gt;
    &lt;ul id="nav-links" class="nav-links"&gt;
      &lt;li&gt;&lt;a href="#courses"&gt;Courses&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#teachers"&gt;Teachers&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="#trial"&gt;Free trial&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/nav&gt;
&lt;/header&gt;
</code></pre>
<pre><code class="language-css">.site-header { position: sticky; top: 0; z-index: 10; background: var(--green); color: #fff; }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #fff; text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column;
               background: var(--green); padding: 16px 20px; }
  .nav-links.open { display: flex; }
}
</code></pre>
<pre><code class="language-js">const toggle = document.querySelector('.nav-toggle');
const links = document.getElementById('nav-links');
toggle.addEventListener('click', () =&gt; {
  const open = links.classList.toggle('open');
  toggle.setAttribute('aria-expanded', open);
});
</code></pre>
<p><code>aria-expanded</code> keeps screen readers informed of the menu state — an easy detail to forget.</p>
<h2>2. The hero</h2>
<p>The hero has one headline, one supporting sentence and one primary action. On desktop it sits beside a summary card; on mobile it stacks.</p>
<pre><code class="language-css">.hero { background: var(--green); color: #fff; padding: 64px 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { font-family: Georgia, serif; font-size: clamp(32px, 5vw, 54px); line-height: 1.1; margin: 0 0 16px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
</code></pre>
<p><code>clamp()</code> scales the headline smoothly between phone and desktop without a stack of breakpoints.</p>
<h2>3. Course cards</h2>
<p>Courses like Noorani Qaida, Quran Reading, Tajweed, Makhariij and Hifz suit a card grid. <code>auto-fit</code> + <code>minmax()</code> produces three columns on desktop, two on tablet and one on phone automatically.</p>
<pre><code class="language-html">&lt;section id="courses" class="container"&gt;
  &lt;h2&gt;Courses&lt;/h2&gt;
  &lt;div class="cards"&gt;
    &lt;article class="card"&gt;
      &lt;h3&gt;Noorani Qaida&lt;/h3&gt;
      &lt;p&gt;Letters, vowels and joining — the foundation for reading.&lt;/p&gt;
    &lt;/article&gt;
    &lt;!-- more cards --&gt;
  &lt;/div&gt;
&lt;/section&gt;
</code></pre>
<pre><code class="language-css">.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}
</code></pre>
<p>Respecting <code>prefers-reduced-motion</code> is a small touch that matters to users sensitive to animation.</p>
<h2>4. Teacher profiles</h2>
<p>Trust is central for parents choosing a teacher. Each profile shows a photo (or initials fallback), qualifications and languages.</p>
<pre><code class="language-html">&lt;article class="teacher"&gt;
  &lt;div class="avatar" aria-hidden="true"&gt;AK&lt;/div&gt;
  &lt;div&gt;
    &lt;h3&gt;Teacher name&lt;/h3&gt;
    &lt;p class="meta"&gt;Tajweed · Hifz · English, Urdu&lt;/p&gt;
  &lt;/div&gt;
&lt;/article&gt;
</code></pre>
<pre><code class="language-css">.teacher { display: flex; gap: 14px; align-items: center; background: #fff;
           border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.avatar { flex: 0 0 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
          background: var(--green-2); color: var(--gold); font-weight: 700; }
.meta { margin: 0; color: var(--muted); font-size: 14px; }
</code></pre>
<p>The initials avatar means the layout never breaks when a photo isn't available — and some teachers may prefer not to publish one.</p>
<h2>5. Trial-class panel</h2>
<p>The final section answers practical questions: how long is the trial, what's needed, and when can it happen. A definition list fits this content better than a pile of divs.</p>
<pre><code class="language-html">&lt;section id="trial" class="trial"&gt;
  &lt;div class="container trial-grid"&gt;
    &lt;div&gt;
      &lt;h2&gt;Book a free trial lesson&lt;/h2&gt;
      &lt;p&gt;Meet a teacher, check your level and ask questions before committing.&lt;/p&gt;
    &lt;/div&gt;
    &lt;dl class="facts"&gt;
      &lt;div&gt;&lt;dt&gt;Length&lt;/dt&gt;&lt;dd&gt;30 minutes&lt;/dd&gt;&lt;/div&gt;
      &lt;div&gt;&lt;dt&gt;Format&lt;/dt&gt;&lt;dd&gt;One-to-one, online&lt;/dd&gt;&lt;/div&gt;
      &lt;div&gt;&lt;dt&gt;Timing&lt;/dt&gt;&lt;dd&gt;Flexible across time zones&lt;/dd&gt;&lt;/div&gt;
    &lt;/dl&gt;
  &lt;/div&gt;
&lt;/section&gt;
</code></pre>
<pre><code class="language-css">.trial { background: var(--green-2); color: #fff; padding: 56px 0; }
.trial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.facts { display: grid; gap: 10px; margin: 0; }
.facts div { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px 16px;
             display: flex; justify-content: space-between; }
.facts dt { color: var(--gold); font-weight: 600; }
.facts dd { margin: 0; }

@media (max-width: 760px) { .trial-grid { grid-template-columns: 1fr; } }
</code></pre>
<h2>Testing checklist</h2>
<ul>
<li>Resize from 320px to 1440px — no horizontal scroll at any width</li>
<li>Tab through the page — every link and button has a visible focus state</li>
<li>Run Lighthouse for accessibility and performance</li>
<li>Check text contrast, especially gold on green</li>
<li>Test with reduced motion enabled</li>
</ul>
<h2>Wrapping up</h2>
<p>Without any framework, a few CSS features do most of the responsive work: custom properties, <code>clamp()</code>, Grid with <code>auto-fit</code>, and a couple of well-placed media queries. For a live example of an online Quran academy organised around similar sections (courses, teachers and a free trial), see <a href="https://quranclasses4u.com/">Quran Classes 4 U</a>. The same structure adapts easily to any course-based education site.</p>
<p>What patterns do you rely on for education websites? I'd love to hear them in the comments.</p>
<hr />
<p><strong>Related:</strong> <a href="https://dev.to/quranclasses4u/building-an-interactive-arabic-alphabet-learning-tool-with-html-css-and-javascript-5b6f">Building an Interactive Arabic Alphabet Learning Tool with HTML, CSS and JavaScript</a></p>
]]></content:encoded></item></channel></rss>