Tag: parent technology

  • A Distraction-Free Reading Timer That Helps Kids Stay Focused

    A smartphone already has a timer, but opening the phone can create a new problem. A child may notice a notification, open YouTube, or move to another app before the reading session even begins. What was supposed to be a 20-minute reading period can easily turn into screen time.

    I wanted a timer with only one purpose: display the remaining reading time in large numbers and make it obvious when the session is complete. The web timer below can run from one HTML file on a computer. It does not show videos, recommendations, messages, or advertisements.

    The timer includes 10-, 15-, 20-, and 30-minute choices, as well as a custom setting. It can be paused or reset, plays a gentle sound at the end, and remembers how many sessions were completed today.

    Reading Timer example

    1. Copy the Reading Timer Code

    Open Notepad and copy all of the following code:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Reading Focus Timer</title>
      <style>
        * { box-sizing: border-box; }
        body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 22px; font-family: Arial, sans-serif; color: #f8fafc; background: linear-gradient(145deg,#0f172a,#1e293b); }
        .app { width: min(680px,100%); text-align: center; }
        h1 { margin: 0 0 8px; font-size: clamp(2rem,5vw,3rem); }
        .subtitle { margin: 0 0 26px; color: #cbd5e1; }
        .card { padding: 32px; border: 1px solid #475569; border-radius: 24px; background: rgba(30,41,59,.88); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
        .presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin-bottom: 22px; }
        button, input { font: inherit; }
        button { padding: 11px 17px; border: 0; border-radius: 10px; font-weight: bold; cursor: pointer; color: white; background: #475569; }
        button:hover { filter: brightness(1.12); }
        .preset.active { background: #0ea5e9; }
        .timer { margin: 14px 0; font-size: clamp(5rem,20vw,9rem); line-height: 1; font-variant-numeric: tabular-nums; font-weight: bold; letter-spacing: -4px; }
        .message { min-height: 28px; color: #bae6fd; font-size: 1.12rem; }
        .controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }
        .start { background: #16a34a; min-width: 130px; }
        .pause { background: #d97706; }
        .reset { background: #64748b; }
        .custom { display: flex; justify-content: center; align-items: center; gap: 9px; margin-top: 16px; color: #cbd5e1; }
        input { width: 78px; padding: 9px; border: 1px solid #64748b; border-radius: 8px; text-align: center; }
        .stats { margin-top: 20px; padding-top: 20px; border-top: 1px solid #475569; color: #cbd5e1; }
        .stats strong { color: #7dd3fc; font-size: 1.4rem; }
        .focus-note { margin: 20px auto 0; max-width: 560px; color: #94a3b8; font-size: .95rem; }
        body.finished { background: linear-gradient(145deg,#064e3b,#065f46); }
      </style>
    </head>
    <body>
      <main class="app">
        <h1>Reading Focus Timer</h1>
        <p class="subtitle">Put distractions away, open your book, and read until the timer ends.</p>
    
        <section class="card">
          <div class="presets" id="presets">
            <button class="preset" data-minutes="10">10 min</button>
            <button class="preset" data-minutes="15">15 min</button>
            <button class="preset active" data-minutes="20">20 min</button>
            <button class="preset" data-minutes="30">30 min</button>
          </div>
    
          <div class="timer" id="timer">20:00</div>
          <div class="message" id="message">Choose a time and press Start.</div>
    
          <div class="controls">
            <button class="start" id="startButton">Start Reading</button>
            <button class="pause" id="pauseButton">Pause</button>
            <button class="reset" id="resetButton">Reset</button>
          </div>
    
          <div class="custom">
            <label for="customMinutes">Custom minutes:</label>
            <input id="customMinutes" type="number" min="1" max="180" value="20">
            <button id="setCustomButton">Set</button>
          </div>
    
          <div class="stats">Completed today: <strong id="sessionCount">0</strong></div>
        </section>
    
        <p class="focus-note">Tip: Press F11 for full-screen mode, silence notifications, and keep the phone in another room during the reading session.</p>
      </main>
    
      <script>
        let selectedSeconds = 20 * 60;
        let remainingSeconds = selectedSeconds;
        let timerId = null;
        let endTime = null;
    
        const timerDisplay = document.getElementById("timer");
        const message = document.getElementById("message");
        const startButton = document.getElementById("startButton");
        const todayKey = new Date().toISOString().split("T")[0];
        const savedStats = JSON.parse(localStorage.getItem("readingTimerStats")) || {};
        let sessionsToday = savedStats.date === todayKey ? savedStats.count : 0;
    
        document.getElementById("sessionCount").textContent = sessionsToday;
    
        function displayTime() {
          const minutes = Math.floor(remainingSeconds / 60);
          const seconds = remainingSeconds % 60;
          timerDisplay.textContent = `${String(minutes).padStart(2,"0")}:${String(seconds).padStart(2,"0")}`;
          document.title = `${timerDisplay.textContent} — Reading Timer`;
        }
    
        function chooseMinutes(minutes) {
          clearInterval(timerId);
          timerId = null;
          selectedSeconds = minutes * 60;
          remainingSeconds = selectedSeconds;
          startButton.textContent = "Start Reading";
          message.textContent = `${minutes}-minute reading session ready.`;
          document.body.classList.remove("finished");
          displayTime();
        }
    
        function startTimer() {
          if (timerId || remainingSeconds <= 0) return;
          endTime = Date.now() + remainingSeconds * 1000;
          message.textContent = "Reading time — stay with your book.";
          startButton.textContent = "Reading…";
    
          timerId = setInterval(() => {
            remainingSeconds = Math.max(0, Math.ceil((endTime - Date.now()) / 1000));
            displayTime();
            if (remainingSeconds === 0) finishSession();
          }, 250);
        }
    
        function pauseTimer() {
          if (!timerId) return;
          clearInterval(timerId);
          timerId = null;
          remainingSeconds = Math.max(0, Math.ceil((endTime - Date.now()) / 1000));
          startButton.textContent = "Continue Reading";
          message.textContent = "Paused. Continue when you are ready.";
          displayTime();
        }
    
        function resetTimer() {
          clearInterval(timerId);
          timerId = null;
          remainingSeconds = selectedSeconds;
          startButton.textContent = "Start Reading";
          message.textContent = "Timer reset. Open your book when ready.";
          document.body.classList.remove("finished");
          displayTime();
        }
    
        function playChime() {
          const audio = new (window.AudioContext || window.webkitAudioContext)();
          [523.25, 659.25, 783.99].forEach((frequency, index) => {
            const oscillator = audio.createOscillator();
            const gain = audio.createGain();
            oscillator.frequency.value = frequency;
            gain.gain.setValueAtTime(0.18, audio.currentTime + index * 0.25);
            gain.gain.exponentialRampToValueAtTime(0.001, audio.currentTime + index * 0.25 + 0.55);
            oscillator.connect(gain).connect(audio.destination);
            oscillator.start(audio.currentTime + index * 0.25);
            oscillator.stop(audio.currentTime + index * 0.25 + 0.6);
          });
        }
    
        function finishSession() {
          clearInterval(timerId);
          timerId = null;
          sessionsToday++;
          localStorage.setItem("readingTimerStats", JSON.stringify({ date: todayKey, count: sessionsToday }));
          document.getElementById("sessionCount").textContent = sessionsToday;
          document.body.classList.add("finished");
          startButton.textContent = "Completed";
          message.textContent = "Reading session complete — great work!";
          document.title = "Reading Complete!";
          playChime();
        }
    
        document.querySelectorAll(".preset").forEach(button => {
          button.addEventListener("click", () => {
            document.querySelectorAll(".preset").forEach(item => item.classList.remove("active"));
            button.classList.add("active");
            chooseMinutes(Number(button.dataset.minutes));
          });
        });
    
        document.getElementById("setCustomButton").addEventListener("click", () => {
          const minutes = Number(document.getElementById("customMinutes").value);
          if (!Number.isInteger(minutes) || minutes < 1 || minutes > 180) {
            alert("Enter a whole number from 1 to 180.");
            return;
          }
          document.querySelectorAll(".preset").forEach(item => item.classList.remove("active"));
          chooseMinutes(minutes);
        });
    
        startButton.addEventListener("click", startTimer);
        document.getElementById("pauseButton").addEventListener("click", pauseTimer);
        document.getElementById("resetButton").addEventListener("click", resetTimer);
        displayTime();
      </script>
    </body>
    </html>

    2. Save and Open the Timer

    1. In Notepad, select File → Save As.
    2. Enter reading-focus-timer.html.
    3. Choose All Files for the file type.
    4. Select UTF-8 and save the file.
    5. Double-click the file to open it in Chrome, Edge, or Firefox.

    If the browser displays code instead of the timer, make sure the file does not end in .txt.

    3. Use It for a Focused Reading Session

    Choose 10, 15, 20, or 30 minutes and select Start Reading. The remaining time appears in large numbers. The timer can be paused if the child needs a necessary break, and Reset returns it to the selected length.

    For fewer distractions:

    1. Put the phone in another room or hand it to a parent.
    2. Close unrelated browser tabs.
    3. Press F11 on Windows to display the timer full screen.
    4. Keep only the book, timer, and any required worksheet nearby.
    5. Begin with a realistic reading period rather than the longest option.

    The web timer cannot technically block YouTube or prevent another tab from being opened. Its purpose is to create a clean, single-purpose screen. Browser parental controls or a separate website blocker would be required for actual blocking.

    4. Choosing the Right Reading Time

    A longer timer is not always better. Ten or fifteen focused minutes may be more useful than thirty minutes interrupted by frustration.

    • 10 minutes: A gentle starting point or a difficult reading day
    • 15 minutes: Short homework reading
    • 20 minutes: A practical everyday reading session
    • 30 minutes: Longer independent reading when attention is steady

    We can increase the time gradually after the routine becomes comfortable. The completed-session count is meant to encourage consistency, not to grade reading speed.

    5. Why the Timer Uses the Actual End Time

    Some simple web timers subtract one second at every interval. That approach can become inaccurate when a browser slows down or a computer briefly becomes busy. This timer records the intended ending time and repeatedly calculates the difference. That helps the displayed countdown stay closer to the real elapsed time.

    6. Troubleshooting

    No sound plays at the end

    Check the computer volume and make sure the browser tab is not muted. Browsers may restrict sound until the user interacts with the page, so always press the Start button rather than expecting the timer to begin automatically.

    The timer stops when the computer sleeps

    The code can correct the displayed time after a brief browser delay, but it cannot keep a sleeping computer awake. Temporarily adjust the Windows sleep setting or interact with the computer before it goes to sleep.

    The completed count disappeared

    The count is saved in the current browser and resets for a new date. Clearing browser data, using a private window, or changing browsers may remove it.

    Final Thoughts

    The most important feature of this timer is its simplicity. It gives a child one visible task: keep reading until the countdown ends. There are no recommended videos or messages competing for attention on the page.

    Start with a manageable time, use the same reading place when possible, and end the session when the chime sounds. A repeatable 15- or 20-minute routine can be more sustainable than waiting for a large block of free time.

  • Blocking YouTube on Windows With a Parent-Controlled PowerShell Tool

    Blocking YouTube on Windows With a Parent-Controlled PowerShell Tool

    A phone is not the only source of distraction during reading time. Even when the phone is put away, YouTube is still available on the family computer. A child may open the browser to check one video and then spend much longer watching recommended videos.

    I wanted a simple way to make the computer less distracting during reading, homework, or violin practice. A browser bookmark or a reminder was not enough. The solution in this guide is a small Windows program with Block YouTube and Unblock YouTube buttons.

    The program adds a clearly marked section to the Windows hosts file. Windows can use this local file when resolving website names, and the program clears the DNS resolver cache after making a change. Microsoft documents both the Windows Hosts file and the ipconfig /flushdns command.

    This is a reversible household focus tool, not an unbreakable security system. A technically knowledgeable user, a VPN, a proxy, or an administrator account can bypass it. For stronger child-account controls, Microsoft Family Safety can block websites and manage limits, although Microsoft’s web filtering is designed around supported browsers such as Edge.

    Youtube blocker running screen

    1. What the YouTube Blocker Does

    The program:

    • Requires Windows administrator approval
    • Creates a backup before changing the hosts file
    • Blocks common YouTube website addresses
    • Provides a one-click unblock option
    • Changes only the section that this program created
    • Clears the Windows DNS cache after each change
    • Shows whether YouTube is currently blocked

    Because changing the hosts file requires administrator rights, the parent should use an administrator account while the child uses a standard Windows account.

    2. Copy the PowerShell Program

    Open Notepad and copy all of the code below:

    # Parent Tech Notes - Simple YouTube Blocker
    # Run only on a Windows computer that you own or manage.
    
    Add-Type -AssemblyName System.Windows.Forms
    Add-Type -AssemblyName System.Drawing
    
    # Ask for administrator permission when needed.
    $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
    $principal = New-Object Security.Principal.WindowsPrincipal($currentUser)
    $isAdmin = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
    
    if (-not $isAdmin) {
        $arguments = "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`""
        Start-Process powershell.exe -Verb RunAs -ArgumentList $arguments
        exit
    }
    
    $hostsPath = Join-Path $env:SystemRoot "System32\drivers\etc\hosts"
    $backupPath = "$hostsPath.parent-tech-notes-backup"
    $beginMarker = "# BEGIN Parent Tech Notes YouTube Block"
    $endMarker = "# END Parent Tech Notes YouTube Block"
    
    $youtubeEntries = @"
    $beginMarker
    0.0.0.0 youtube.com
    0.0.0.0 www.youtube.com
    0.0.0.0 m.youtube.com
    0.0.0.0 music.youtube.com
    0.0.0.0 kids.youtube.com
    0.0.0.0 youtu.be
    0.0.0.0 www.youtu.be
    0.0.0.0 youtube-nocookie.com
    0.0.0.0 www.youtube-nocookie.com
    $endMarker
    "@
    
    function Get-HostsText {
        if (Test-Path $hostsPath) {
            return [IO.File]::ReadAllText($hostsPath)
        }
        return ""
    }
    
    function Remove-ProgramBlock([string]$text) {
        $pattern = "(?ms)\r?\n?" + [regex]::Escape($beginMarker) +
                   ".*?" + [regex]::Escape($endMarker) + "\r?\n?"
        return ([regex]::Replace($text, $pattern, "`r`n")).TrimEnd() + "`r`n"
    }
    
    function Save-HostsText([string]$text) {
        [IO.File]::WriteAllText($hostsPath, $text, [Text.Encoding]::ASCII)
        & ipconfig.exe /flushdns | Out-Null
    }
    
    function Test-YouTubeBlocked {
        return (Get-HostsText).Contains($beginMarker)
    }
    
    function Update-Status {
        if (Test-YouTubeBlocked) {
            $statusLabel.Text = "YouTube is BLOCKED on this computer."
            $statusLabel.ForeColor = [Drawing.Color]::FromArgb(22, 101, 52)
            $statusPanel.BackColor = [Drawing.Color]::FromArgb(220, 252, 231)
        }
        else {
            $statusLabel.Text = "YouTube is currently available."
            $statusLabel.ForeColor = [Drawing.Color]::FromArgb(153, 27, 27)
            $statusPanel.BackColor = [Drawing.Color]::FromArgb(254, 226, 226)
        }
    }
    
    function Block-YouTube {
        try {
            if (-not (Test-Path $backupPath)) {
                Copy-Item $hostsPath $backupPath -Force
            }
    
            $cleanText = Remove-ProgramBlock (Get-HostsText)
            $newText = $cleanText.TrimEnd() + "`r`n`r`n" + $youtubeEntries.Trim() + "`r`n"
            Save-HostsText $newText
            Update-Status
    
            [Windows.Forms.MessageBox]::Show(
                "YouTube has been blocked. Close and reopen any YouTube browser tabs.",
                "YouTube Blocker",
                "OK",
                "Information"
            ) | Out-Null
        }
        catch {
            [Windows.Forms.MessageBox]::Show(
                "The blocker could not update Windows.`n`n$($_.Exception.Message)",
                "YouTube Blocker",
                "OK",
                "Error"
            ) | Out-Null
        }
    }
    
    function Unblock-YouTube {
        try {
            $cleanText = Remove-ProgramBlock (Get-HostsText)
            Save-HostsText $cleanText
            Update-Status
    
            [Windows.Forms.MessageBox]::Show(
                "YouTube has been unblocked. Reopen the browser if the site does not load immediately.",
                "YouTube Blocker",
                "OK",
                "Information"
            ) | Out-Null
        }
        catch {
            [Windows.Forms.MessageBox]::Show(
                "The blocker could not update Windows.`n`n$($_.Exception.Message)",
                "YouTube Blocker",
                "OK",
                "Error"
            ) | Out-Null
        }
    }
    
    $form = New-Object Windows.Forms.Form
    $form.Text = "Parent YouTube Blocker"
    $form.Size = New-Object Drawing.Size(520, 350)
    $form.StartPosition = "CenterScreen"
    $form.FormBorderStyle = "FixedDialog"
    $form.MaximizeBox = $false
    $form.BackColor = [Drawing.Color]::White
    
    $title = New-Object Windows.Forms.Label
    $title.Text = "YouTube Focus Control"
    $title.Font = New-Object Drawing.Font("Segoe UI", 20, [Drawing.FontStyle]::Bold)
    $title.AutoSize = $true
    $title.Location = New-Object Drawing.Point(85, 28)
    $form.Controls.Add($title)
    
    $description = New-Object Windows.Forms.Label
    $description.Text = "Use this tool during reading, homework, or music practice."
    $description.Font = New-Object Drawing.Font("Segoe UI", 10)
    $description.AutoSize = $true
    $description.Location = New-Object Drawing.Point(70, 75)
    $form.Controls.Add($description)
    
    $statusPanel = New-Object Windows.Forms.Panel
    $statusPanel.Size = New-Object Drawing.Size(430, 58)
    $statusPanel.Location = New-Object Drawing.Point(36, 110)
    $form.Controls.Add($statusPanel)
    
    $statusLabel = New-Object Windows.Forms.Label
    $statusLabel.Font = New-Object Drawing.Font("Segoe UI", 11, [Drawing.FontStyle]::Bold)
    $statusLabel.AutoSize = $true
    $statusLabel.Location = New-Object Drawing.Point(70, 18)
    $statusPanel.Controls.Add($statusLabel)
    
    $blockButton = New-Object Windows.Forms.Button
    $blockButton.Text = "Block YouTube"
    $blockButton.Size = New-Object Drawing.Size(190, 55)
    $blockButton.Location = New-Object Drawing.Point(36, 195)
    $blockButton.BackColor = [Drawing.Color]::FromArgb(220, 38, 38)
    $blockButton.ForeColor = [Drawing.Color]::White
    $blockButton.FlatStyle = "Flat"
    $blockButton.Font = New-Object Drawing.Font("Segoe UI", 11, [Drawing.FontStyle]::Bold)
    $blockButton.Add_Click({ Block-YouTube })
    $form.Controls.Add($blockButton)
    
    $unblockButton = New-Object Windows.Forms.Button
    $unblockButton.Text = "Unblock YouTube"
    $unblockButton.Size = New-Object Drawing.Size(190, 55)
    $unblockButton.Location = New-Object Drawing.Point(276, 195)
    $unblockButton.BackColor = [Drawing.Color]::FromArgb(37, 99, 235)
    $unblockButton.ForeColor = [Drawing.Color]::White
    $unblockButton.FlatStyle = "Flat"
    $unblockButton.Font = New-Object Drawing.Font("Segoe UI", 11, [Drawing.FontStyle]::Bold)
    $unblockButton.Add_Click({ Unblock-YouTube })
    $form.Controls.Add($unblockButton)
    
    $note = New-Object Windows.Forms.Label
    $note.Text = "A backup is saved before the first change. Administrator approval is required."
    $note.Font = New-Object Drawing.Font("Segoe UI", 8.5)
    $note.ForeColor = [Drawing.Color]::DimGray
    $note.AutoSize = $true
    $note.Location = New-Object Drawing.Point(45, 277)
    $form.Controls.Add($note)
    
    Update-Status
    [void]$form.ShowDialog()

    3. Save the Program Correctly

    1. In Notepad, select File → Save As.
    2. Enter Parent-YouTube-Blocker.ps1 as the file name.
    3. Change Save as type to All Files.
    4. Select UTF-8 and save the file in a folder that only the parent uses.

    Do not save it as .txt. In File Explorer, enable View → Show → File name extensions if the complete name is hidden.

    4. Run the Program

    PowerShell scripts may not run by double-clicking. Use this straightforward method:

    1. Find the Parent-YouTube-Blocker.ps1 file in File Explorer.
    2. Hold the Shift key and right-click the file.
    3. Select Copy as path. In some versions of Windows 11, you may need to select Show more options first.
    4. Right-click the Windows Start button and select Terminal (Admin).
    5. Approve the User Account Control prompt.
    6. Type the following command and leave one space at the end:
    powershell.exe -NoProfile -ExecutionPolicy Bypass -File
    1. Press Ctrl + V to paste the copied file path after the command.
    2. Press Enter.

    The completed command should look similar to this:

    powershell.exe -NoProfile -ExecutionPolicy Bypass -File "C:\Users\Parent\Desktop\Parent-YouTube-Blocker.ps1"

    Keep the quotation marks around the file path. If the Desktop is managed by OneDrive, the path may include OneDrive\Desktop.

    Dragging the script from File Explorer into an administrator Terminal window may not work because Windows can prevent drag-and-drop between a regular File Explorer window and an elevated application. Copy as path avoids that problem.

    The bypass option applies to that one PowerShell launch. It does not permanently lower the computer’s execution policy.

    5. Block and Unblock YouTube

    Select Block YouTube before reading, homework, or violin practice. Close existing YouTube tabs and reopen the browser. Direct visits to the common YouTube addresses should fail.

    When YouTube is needed for an approved lesson, run the same program and select Unblock YouTube. The program removes only the text between its own beginning and ending markers.

    The first time the program blocks YouTube, it creates this backup next to the hosts file:

    hosts.parent-tech-notes-backup

    The unblock button normally makes restoring that backup unnecessary. The backup is an additional precaution.

    6. Make the Block Harder for a Child to Remove

    The most important step is account separation:

    1. Keep the parent’s Windows account as an administrator.
    2. Give the child a standard Windows account.
    3. Do not share the administrator password or PIN.
    4. Keep the blocker script in the parent’s private folder.
    5. Block YouTube before the child begins the focused activity.

    If the child has administrator access, the child can edit the hosts file or run the unblock button. This program is most useful when the parent controls administrator approval.

    7. Important Limitations

    This program blocks common YouTube website addresses on one Windows computer. It does not:

    • Block the YouTube phone or TV app
    • Control another computer on the network
    • Prevent access through every VPN or proxy
    • Guarantee that every embedded YouTube video is blocked
    • Create a timed automatic unblock schedule

    It may also affect YouTube videos embedded in school websites. Use Unblock YouTube temporarily when a teacher assigns a required video.

    For stronger controls across a child’s Microsoft account, Microsoft Family Safety is the better long-term option. Microsoft says family organizers can manage blocked apps and sites and screen-time limits.

    8. Troubleshooting

    YouTube still opens in an existing tab

    Close every YouTube tab and completely restart the browser. Confirm that the program status says YouTube is blocked.

    The program displays an access error

    The hosts file requires administrator permission. Close the program and launch it through Terminal (Admin).

    Windows Security warns about the script

    Only run code that you have reviewed and saved yourself. The script changes a protected networking file, so Windows may request confirmation. Do not download a modified copy from an unknown website.

    YouTube remains blocked after selecting Unblock

    Close and reopen the browser. If necessary, restart Windows. The program already runs ipconfig /flushdns, the Windows command used to clear the DNS client resolver cache.

    Final Thoughts

    Blocking YouTube does not replace a family routine, but it removes one easy path to distraction. During reading time, the computer can stay available for a dictionary, school document, or reading timer without placing YouTube one click away.

    The best setup is simple: use a standard account for the child, keep administrator access with the parent, block YouTube before the activity begins, and unblock it only when there is a clear reason to use it.

  • A Daily HTML Schedule for School, Reading, and Violin Practice

    A Daily HTML Schedule for School, Reading, and Violin Practice

    Daily Schedule Example

    A busy school day can pass quickly without leaving enough time for reading, homework, or music practice. In our home, the challenge is not a lack of activities. It is fitting school, reading, violin practice, meals, breaks, and free time into a routine that feels realistic.

    When the plan exists only in a parent’s memory, a child may not know what comes next. We may also lose time repeatedly deciding when to start an activity. A visible daily schedule can reduce that uncertainty without turning every minute into work.

    The program below creates a simple schedule in one HTML file. It already includes sample entries for school, reading, and violin practice. You can add new activities, mark them complete, or delete activities that are no longer needed. The schedule is saved in the browser automatically.

    1. What This Daily Schedule Can Do

    • Add an activity with a start and end time
    • Group activities as school, study, reading, music, break, or family time
    • Display activities in time order
    • Mark completed activities
    • Show how many activities are finished
    • Delete unwanted entries
    • Restore the sample schedule
    • Save changes in the browser

    2. Copy the Complete HTML Template

    Open Notepad and copy all of the code below:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>My Daily Schedule</title>
      <style>
        * { box-sizing: border-box; }
        body { margin: 0; padding: 24px; min-height: 100vh; font-family: Arial, sans-serif; color: #1f2937; background: linear-gradient(135deg,#eff6ff,#f5f3ff); }
        .container { width: min(900px,100%); margin: auto; }
        header { text-align: center; margin-bottom: 22px; }
        h1 { color: #3730a3; margin-bottom: 8px; }
        h2 { margin-top: 0; color: #312e81; }
        .panel { background: white; padding: 24px; margin-bottom: 20px; border-radius: 18px; box-shadow: 0 10px 28px rgba(31,41,55,.1); }
        form { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr auto; gap: 12px; align-items: end; }
        label { display: block; margin-bottom: 6px; font-weight: bold; }
        input, select { width: 100%; padding: 11px; border: 2px solid #d1d5db; border-radius: 9px; font: inherit; }
        input:focus, select:focus { outline: none; border-color: #6366f1; }
        button { border: 0; border-radius: 9px; padding: 12px 16px; color: white; background: #4f46e5; font-weight: bold; cursor: pointer; }
        button:hover { filter: brightness(.94); }
        .summary { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
        .progress-track { flex: 1; height: 12px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
        .progress-bar { height: 100%; width: 0; background: #16a34a; transition: width .25s; }
        .schedule { display: grid; gap: 12px; }
        .item { display: grid; grid-template-columns: 125px 1fr auto auto; align-items: center; gap: 14px; padding: 16px; border-left: 8px solid #6366f1; border-radius: 12px; background: #f8fafc; }
        .item.completed { opacity: .62; }
        .item.completed .activity { text-decoration: line-through; }
        .time { font-weight: bold; color: #4338ca; }
        .activity { font-size: 1.08rem; font-weight: bold; }
        .category { display: inline-block; margin-top: 5px; padding: 4px 9px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: .82rem; }
        .complete { background: #15803d; }
        .delete { background: #dc2626; }
        .footer-actions { display: flex; justify-content: center; margin-top: 18px; }
        .reset { background: #64748b; }
        .empty { text-align: center; color: #6b7280; padding: 24px; }
        @media(max-width:760px){ form{grid-template-columns:1fr 1fr} .wide{grid-column:1/-1} .item{grid-template-columns:1fr} .item button{width:100%} }
      </style>
    </head>
    <body>
      <main class="container">
        <header>
          <h1>My Daily Schedule</h1>
          <p>A clear plan for school, study, practice, rest, and family time.</p>
        </header>
    
        <section class="panel">
          <h2>Add an Activity</h2>
          <form id="scheduleForm">
            <div class="wide"><label for="activity">Activity</label><input id="activity" required placeholder="Example: Math homework"></div>
            <div><label for="startTime">Start</label><input id="startTime" type="time" required></div>
            <div><label for="endTime">End</label><input id="endTime" type="time" required></div>
            <div><label for="category">Category</label><select id="category"><option>School</option><option>Study</option><option>Reading</option><option>Music</option><option>Break</option><option>Family</option></select></div>
            <button type="submit">Add</button>
          </form>
        </section>
    
        <section class="panel summary">
          <strong id="progressText">0 of 0 completed</strong>
          <div class="progress-track"><div class="progress-bar" id="progressBar"></div></div>
        </section>
    
        <section class="panel">
          <h2>Today's Plan</h2>
          <div class="schedule" id="scheduleList"></div>
          <div class="footer-actions"><button class="reset" id="resetButton">Restore Sample Schedule</button></div>
        </section>
      </main>
    
      <script>
        const storageKey = "familyDailySchedule";
        const sampleSchedule = [
          { id: 1, activity: "Get ready and eat breakfast", start: "07:00", end: "07:40", category: "Family", completed: false },
          { id: 2, activity: "School", start: "08:00", end: "15:00", category: "School", completed: false },
          { id: 3, activity: "Snack and quiet break", start: "15:30", end: "16:00", category: "Break", completed: false },
          { id: 4, activity: "Homework and school review", start: "16:00", end: "17:00", category: "Study", completed: false },
          { id: 5, activity: "Violin practice", start: "17:10", end: "17:40", category: "Music", completed: false },
          { id: 6, activity: "Dinner and family time", start: "18:00", end: "19:00", category: "Family", completed: false },
          { id: 7, activity: "Reading", start: "19:15", end: "19:40", category: "Reading", completed: false },
          { id: 8, activity: "Free time and prepare for tomorrow", start: "19:40", end: "20:30", category: "Break", completed: false }
        ];
    
        let schedule = JSON.parse(localStorage.getItem(storageKey)) || structuredClone(sampleSchedule);
        const list = document.getElementById("scheduleList");
    
        function save(){ localStorage.setItem(storageKey, JSON.stringify(schedule)); }
        function displayTime(time){ const [h,m]=time.split(":"); const hour=Number(h); return `${hour%12||12}:${m} ${hour>=12?"PM":"AM"}`; }
    
        function render(){
          list.innerHTML = "";
          schedule.sort((a,b)=>a.start.localeCompare(b.start));
          if(!schedule.length){ list.innerHTML='<p class="empty">No activities have been added.</p>'; }
    
          schedule.forEach(item=>{
            const row=document.createElement("div");
            row.className=`item${item.completed?" completed":""}`;
    
            const time=document.createElement("div"); time.className="time"; time.textContent=`${displayTime(item.start)}–${displayTime(item.end)}`;
            const details=document.createElement("div");
            const name=document.createElement("div"); name.className="activity"; name.textContent=item.activity;
            const tag=document.createElement("span"); tag.className="category"; tag.textContent=item.category;
            details.append(name,tag);
    
            const done=document.createElement("button"); done.className="complete"; done.textContent=item.completed?"Undo":"Done"; done.onclick=()=>toggle(item.id);
            const remove=document.createElement("button"); remove.className="delete"; remove.textContent="Delete"; remove.onclick=()=>removeItem(item.id);
            row.append(time,details,done,remove); list.appendChild(row);
          });
    
          const completed=schedule.filter(item=>item.completed).length;
          document.getElementById("progressText").textContent=`${completed} of ${schedule.length} completed`;
          document.getElementById("progressBar").style.width=schedule.length?`${completed/schedule.length*100}%`:"0%";
        }
    
        function toggle(id){ const item=schedule.find(item=>item.id===id); item.completed=!item.completed; save(); render(); }
        function removeItem(id){ if(confirm("Delete this activity?")){ schedule=schedule.filter(item=>item.id!==id); save(); render(); } }
    
        document.getElementById("scheduleForm").addEventListener("submit",event=>{
          event.preventDefault();
          const start=document.getElementById("startTime").value;
          const end=document.getElementById("endTime").value;
          if(end<=start){ alert("The end time must be later than the start time."); return; }
          schedule.push({ id:Date.now(), activity:document.getElementById("activity").value.trim(), start, end, category:document.getElementById("category").value, completed:false });
          save(); event.target.reset(); render();
        });
    
        document.getElementById("resetButton").addEventListener("click",()=>{
          if(confirm("Replace the current schedule with the sample schedule?")){ schedule=structuredClone(sampleSchedule); save(); render(); }
        });
    
        render();
      </script>
    </body>
    </html>

    3. Save and Open the Schedule

    1. In Notepad, select File → Save As.
    2. Name the file daily-schedule.html.
    3. Change Save as type to All Files.
    4. Select UTF-8 and save it.
    5. Double-click the saved file to open it in a browser.

    If it opens as text, check that the file is not named daily-schedule.html.txt.

    4. Adjust the Sample Schedule

    The included schedule is only a starting point. School is shown from 8:00 AM to 3:00 PM, followed by a break, homework, violin practice, dinner, reading, and free time. Use the form to add your own activities and delete entries that do not fit your family.

    Avoid filling every open minute. A schedule becomes difficult to follow when it does not include transition time, meals, or rest. Leaving 10 minutes between homework and violin practice can make both activities easier to begin.

    5. Use the Schedule to Reduce Wasted Time

    The greatest benefit is reducing repeated decisions. Instead of asking, “What should we do now?” after school, the next activity is already visible.

    A practical routine is:

    1. Check the schedule after arriving home.
    2. Complete the highest-priority school task first.
    3. Keep violin practice focused and reasonably short.
    4. Use reading as a regular daily block rather than waiting for extra time.
    5. Mark each activity complete and move on.

    The goal is not to make a child busy all day. Free time belongs on the schedule too. A balanced plan helps protect rest while preventing important activities from being forgotten.

    6. How the Schedule Is Saved

    The program uses the browser’s localStorage. Changes normally remain after the page is closed. Always use the same HTML file and browser. Records may be lost if browser data is cleared, a private window is used, or the file is opened on another computer.

    7. Troubleshooting

    Activities are not in the order entered

    The program sorts activities by starting time automatically. This keeps the day in chronological order.

    An activity cannot be added

    Make sure the activity name, start time, and end time are entered. The ending time must be later than the starting time.

    The original examples disappeared

    Select Restore Sample Schedule. This replaces the current entries, so use it only when you are ready to reset the schedule.

    Final Thoughts

    A useful schedule should provide direction without making family life rigid. For us, the important pieces are school responsibilities, a realistic reading period, regular violin practice, and enough breaks to make the plan sustainable.

    Start with only the activities that matter most. After using the schedule for several days, adjust the times based on what actually works. A plan that can be followed is more valuable than a perfect-looking timetable that is too crowded.

  • A Simple HTML Reading Logbook Kids Can Keep Using

    A Simple HTML Reading Logbook Kids Can Keep Using

    Daily Reading Log example

    Reading regularly is easier to encourage when a child can see the progress being made. The difficult part in our home was not simply choosing a book. We needed a consistent way to remember when the reading happened, how many pages were completed, and how much time was spent reading.

    Without a log, one reading session could easily blend into the next. It was also difficult to tell whether reading had become a steady routine or had been skipped for several days. A paper chart can work, but it may be misplaced or forgotten. I wanted one simple file that we could open on the computer after each reading session.

    The HTML reading logbook in this guide records the book title, pages read, reading time, date, and an optional note. It also calculates the total pages and minutes automatically. The entries remain saved in the same browser, even after the page is closed.

    1. What This Reading Logbook Can Do

    The program lets a parent or child:

    • Enter a book title
    • Record the number of pages read
    • Record reading time in minutes
    • Select the reading date
    • Add a short note or chapter name
    • See total sessions, pages, and minutes
    • Delete an incorrect entry
    • Keep the records after closing the browser

    It runs from one HTML file and does not require an account, subscription, or internet connection.

    2. What You Need

    You only need:

    1. A Windows computer
    2. Notepad
    3. A browser such as Chrome, Edge, or Firefox

    No special programming software is required.

    3. Copy This Reading Logbook Template

    Open Notepad and copy the complete code below:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>My Reading Logbook</title>
      <style>
        * { box-sizing: border-box; }
    
        body {
          margin: 0;
          padding: 24px;
          min-height: 100vh;
          font-family: Arial, sans-serif;
          color: #1f2937;
          background: linear-gradient(135deg, #fff7ed, #ecfdf5);
        }
    
        .container {
          width: min(1000px, 100%);
          margin: 0 auto;
        }
    
        header {
          margin-bottom: 22px;
          text-align: center;
        }
    
        h1 { margin-bottom: 8px; color: #166534; }
        h2 { margin-top: 0; color: #14532d; }
        header p { margin: 0; color: #4b5563; }
    
        .panel {
          margin-bottom: 22px;
          padding: 24px;
          background: white;
          border-radius: 18px;
          box-shadow: 0 10px 28px rgba(31, 41, 55, 0.1);
        }
    
        form {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 16px;
        }
    
        .full-width { grid-column: 1 / -1; }
    
        label {
          display: block;
          margin-bottom: 6px;
          font-weight: bold;
        }
    
        input, textarea {
          width: 100%;
          padding: 12px;
          border: 2px solid #d1d5db;
          border-radius: 9px;
          font: inherit;
        }
    
        input:focus, textarea:focus {
          outline: none;
          border-color: #16a34a;
        }
    
        textarea { min-height: 80px; resize: vertical; }
    
        button {
          padding: 12px 18px;
          border: 0;
          border-radius: 9px;
          font-size: 1rem;
          font-weight: bold;
          color: white;
          background: #15803d;
          cursor: pointer;
        }
    
        button:hover { filter: brightness(0.93); }
    
        .summary {
          display: grid;
          grid-template-columns: repeat(3, 1fr);
          gap: 14px;
          margin-bottom: 22px;
        }
    
        .summary-card {
          padding: 20px;
          text-align: center;
          background: white;
          border-radius: 15px;
          box-shadow: 0 8px 22px rgba(31, 41, 55, 0.08);
        }
    
        .summary-number {
          display: block;
          margin-bottom: 4px;
          font-size: 2rem;
          font-weight: bold;
          color: #15803d;
        }
    
        .table-wrap { overflow-x: auto; }
    
        table {
          width: 100%;
          border-collapse: collapse;
        }
    
        th, td {
          padding: 12px 10px;
          border-bottom: 1px solid #e5e7eb;
          text-align: left;
          vertical-align: top;
        }
    
        th { background: #f0fdf4; color: #14532d; }
    
        .delete-button {
          padding: 8px 11px;
          background: #dc2626;
          font-size: 0.9rem;
        }
    
        .empty-message {
          padding: 25px 10px;
          text-align: center;
          color: #6b7280;
        }
    
        @media (max-width: 650px) {
          form { grid-template-columns: 1fr; }
          .full-width { grid-column: auto; }
          .summary { grid-template-columns: 1fr; }
        }
      </style>
    </head>
    <body>
      <main class="container">
        <header>
          <h1>My Reading Logbook</h1>
          <p>Record each reading session and watch your progress grow.</p>
        </header>
    
        <section class="panel">
          <h2>Add a Reading Session</h2>
          <form id="readingForm">
            <div>
              <label for="bookTitle">Book Title</label>
              <input id="bookTitle" type="text" required placeholder="Example: Charlotte's Web">
            </div>
    
            <div>
              <label for="readingDate">Date</label>
              <input id="readingDate" type="date" required>
            </div>
    
            <div>
              <label for="pagesRead">Pages Read</label>
              <input id="pagesRead" type="number" min="1" required placeholder="Example: 12">
            </div>
    
            <div>
              <label for="minutesRead">Reading Time (Minutes)</label>
              <input id="minutesRead" type="number" min="1" required placeholder="Example: 20">
            </div>
    
            <div class="full-width">
              <label for="notes">Notes or Chapter (Optional)</label>
              <textarea id="notes" placeholder="Example: Chapter 3 — learned why Wilbur was worried"></textarea>
            </div>
    
            <div class="full-width">
              <button type="submit">Add to Reading Log</button>
            </div>
          </form>
        </section>
    
        <section class="summary" aria-label="Reading totals">
          <div class="summary-card">
            <span class="summary-number" id="totalSessions">0</span>
            Reading Sessions
          </div>
          <div class="summary-card">
            <span class="summary-number" id="totalPages">0</span>
            Pages Read
          </div>
          <div class="summary-card">
            <span class="summary-number" id="totalMinutes">0</span>
            Minutes Read
          </div>
        </section>
    
        <section class="panel">
          <h2>Reading History</h2>
          <div class="table-wrap">
            <table id="readingTable">
              <thead>
                <tr>
                  <th>Date</th>
                  <th>Book</th>
                  <th>Pages</th>
                  <th>Minutes</th>
                  <th>Notes</th>
                  <th>Action</th>
                </tr>
              </thead>
              <tbody id="readingTableBody"></tbody>
            </table>
            <p class="empty-message" id="emptyMessage">No reading sessions have been added yet.</p>
          </div>
        </section>
      </main>
    
      <script>
        const storageKey = "familyReadingLog";
        let readingEntries = JSON.parse(localStorage.getItem(storageKey)) || [];
    
        const readingForm = document.getElementById("readingForm");
        const readingDate = document.getElementById("readingDate");
        const tableBody = document.getElementById("readingTableBody");
        const emptyMessage = document.getElementById("emptyMessage");
    
        readingDate.value = new Date().toISOString().split("T")[0];
    
        function saveEntries() {
          localStorage.setItem(storageKey, JSON.stringify(readingEntries));
        }
    
        function formatDate(dateText) {
          const parts = dateText.split("-");
          return `${parts[1]}/${parts[2]}/${parts[0]}`;
        }
    
        function renderEntries() {
          tableBody.innerHTML = "";
    
          const sortedEntries = [...readingEntries].sort((a, b) =>
            b.date.localeCompare(a.date)
          );
    
          sortedEntries.forEach(entry => {
            const row = document.createElement("tr");
    
            const values = [
              formatDate(entry.date),
              entry.title,
              entry.pages,
              entry.minutes,
              entry.notes || "—"
            ];
    
            values.forEach(value => {
              const cell = document.createElement("td");
              cell.textContent = value;
              row.appendChild(cell);
            });
    
            const actionCell = document.createElement("td");
            const deleteButton = document.createElement("button");
            deleteButton.textContent = "Delete";
            deleteButton.className = "delete-button";
            deleteButton.addEventListener("click", () => deleteEntry(entry.id));
            actionCell.appendChild(deleteButton);
            row.appendChild(actionCell);
    
            tableBody.appendChild(row);
          });
    
          emptyMessage.style.display = readingEntries.length === 0 ? "block" : "none";
          document.getElementById("readingTable").style.display =
            readingEntries.length === 0 ? "none" : "table";
    
          updateSummary();
        }
    
        function updateSummary() {
          const totalPages = readingEntries.reduce((sum, entry) => sum + entry.pages, 0);
          const totalMinutes = readingEntries.reduce((sum, entry) => sum + entry.minutes, 0);
    
          document.getElementById("totalSessions").textContent = readingEntries.length;
          document.getElementById("totalPages").textContent = totalPages;
          document.getElementById("totalMinutes").textContent = totalMinutes;
        }
    
        function deleteEntry(id) {
          const confirmed = window.confirm("Delete this reading entry?");
          if (!confirmed) return;
    
          readingEntries = readingEntries.filter(entry => entry.id !== id);
          saveEntries();
          renderEntries();
        }
    
        readingForm.addEventListener("submit", event => {
          event.preventDefault();
    
          const newEntry = {
            id: Date.now(),
            title: document.getElementById("bookTitle").value.trim(),
            date: readingDate.value,
            pages: Number(document.getElementById("pagesRead").value),
            minutes: Number(document.getElementById("minutesRead").value),
            notes: document.getElementById("notes").value.trim()
          };
    
          readingEntries.push(newEntry);
          saveEntries();
          renderEntries();
    
          readingForm.reset();
          readingDate.value = new Date().toISOString().split("T")[0];
          document.getElementById("bookTitle").focus();
        });
    
        renderEntries();
      </script>
    </body>
    </html>

    4. Save the File Correctly

    After copying the code into Notepad:

    1. Select File → Save As.
    2. Enter reading-logbook.html as the file name.
    3. Change Save as type to All Files.
    4. Select UTF-8 as the encoding.
    5. Save the file to the Desktop or another easy-to-find folder.

    Make sure the file name ends in .html. If Windows saves it as reading-logbook.html.txt, it will open as a text document instead of a web page.

    5. Add the First Reading Session

    Double-click reading-logbook.html. The logbook should open in your default browser.

    After a reading session, enter:

    • The title of the book
    • The date
    • The number of pages completed during that session
    • The number of minutes spent reading
    • An optional note about the chapter or reading experience

    Then select Add to Reading Log. The entry will appear in the reading history, and the totals will update automatically.

    The pages field should contain the number of pages read during that session, not the final page number. For example, if a child reads from page 21 through page 30, enter 10 pages.

    6. How the Records Stay Saved

    This program uses a browser feature called localStorage. It saves the reading entries in the browser on the current computer. Closing the tab or restarting the computer normally will not remove the records.

    However, the records may disappear if you:

    • Clear the browser’s site data
    • Use a private or incognito window
    • Open the file in a different browser
    • Move to another computer

    For consistent results, open the logbook with the same browser each time. Do not use it for information that must be permanently archived unless you also keep a backup elsewhere.

    7. How We Can Use the Log Without Making Reading Feel Like a Test

    The purpose of this logbook is to support consistency, not to pressure a child to read faster. A short session still counts. Seeing several 10- or 15-minute sessions can show that a reading habit is developing even when finishing a book takes time.

    In our situation, the useful part is being able to look back instead of relying on memory. The totals make it easier to notice whether reading has happened regularly, while the notes can remind us which chapter or idea was difficult. This gives us a starting point for the next session.

    A simple routine could be:

    1. Read for 15 to 20 minutes.
    2. Add the pages and minutes to the log.
    3. Write one short note about what happened in the book.
    4. Review the weekly total together without treating it as a grade.

    8. Troubleshooting Common Problems

    The program opens as text

    Check that the file ends in .html, not .txt. In File Explorer, select View → Show → File name extensions to see the complete name.

    A new entry does not appear

    All required fields must be completed. Pages and minutes must contain numbers greater than zero.

    Previous entries disappeared

    Confirm that the same HTML file is open in the same browser. Clearing browser data or using a private window can remove locally saved information.

    The program does not open after editing

    A character may have been accidentally deleted from the code. Start with a fresh copy of the original template and make only small text or color changes until the program works again.

    Final Thoughts

    Building a reading habit usually requires more than telling a child to read more. It helps to make the routine visible and manageable. This small logbook brings the title, pages, time, date, and notes together in one place.

    Start by recording one session each day or several sessions each week. The goal is not to create perfect statistics. It is to help a child recognize steady progress and give parents a practical way to support the next reading session.

  • An HTML Flashcard Tool for Repeating Difficult Study Material

    An HTML Flashcard Tool for Repeating Difficult Study Material

    Flashcard example

    Helping a child review for a test can become surprisingly complicated. Notes may be in Google Classroom, worksheets may be in a backpack, and important vocabulary may be spread across several assignments. In our home, one of the hardest parts was not finding the material—it was getting through the same material more than once. After reviewing a question one time, it was easy to move on even when the answer was not fully remembered.

    Keeping track of the results was inconvenient too. We could use paper flashcards, but then we had to make separate piles or marks to remember which questions needed another try. I wanted a simple tool that could show one question at a time, reveal the answer, and record whether the answer was correct.

    The solution below is a small flashcard program that runs in a web browser. It does not require an account, a subscription, or an internet connection after the file has been saved. A parent only needs to replace the sample questions and answers.

    1. What This Flashcard Tool Does

    The program includes several useful study features:

    • Shows one question at a time
    • Reveals the answer when the card is clicked
    • Provides Previous and Next buttons
    • Records I Got It and Review Again responses
    • Displays the score and remaining cards
    • Offers a Restart button for another study round
    • Runs locally on a Windows computer

    This is useful for vocabulary, science terms, history facts, math formulas, spelling, and short-answer test review.

    2. What You Need

    You only need:

    1. A Windows computer
    2. Notepad
    3. A web browser such as Chrome, Edge, or Firefox
    4. A list of questions and answers

    No programming software needs to be installed.

    3. Copy the Flashcard Template

    Open Notepad and copy all of the following code into a new blank file:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Family Study Flashcards</title>
      <style>
        * { box-sizing: border-box; }
    
        body {
          margin: 0;
          min-height: 100vh;
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 24px;
          font-family: Arial, sans-serif;
          color: #1f2937;
          background: linear-gradient(135deg, #e0f2fe, #ede9fe);
        }
    
        .app {
          width: min(680px, 100%);
          padding: 28px;
          background: white;
          border-radius: 22px;
          box-shadow: 0 16px 40px rgba(31, 41, 55, 0.15);
        }
    
        h1 {
          margin: 0 0 8px;
          text-align: center;
          color: #312e81;
        }
    
        .instructions, .status {
          text-align: center;
          color: #4b5563;
        }
    
        .progress-track {
          height: 10px;
          margin: 18px 0;
          overflow: hidden;
          background: #e5e7eb;
          border-radius: 999px;
        }
    
        .progress-bar {
          height: 100%;
          width: 0;
          background: #4f46e5;
          transition: width 0.25s ease;
        }
    
        .card {
          min-height: 260px;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          padding: 34px;
          border: 3px solid #c7d2fe;
          border-radius: 18px;
          text-align: center;
          cursor: pointer;
          background: #f8fafc;
          transition: transform 0.2s, background 0.2s;
          user-select: none;
        }
    
        .card:hover { transform: translateY(-2px); }
        .card.answer { background: #ecfdf5; border-color: #6ee7b7; }
    
        .label {
          margin-bottom: 16px;
          font-size: 0.85rem;
          font-weight: bold;
          letter-spacing: 0.12em;
          color: #6366f1;
        }
    
        .card.answer .label { color: #047857; }
    
        .card-text {
          font-size: clamp(1.35rem, 4vw, 2rem);
          line-height: 1.4;
          font-weight: bold;
        }
    
        .controls, .rating-controls {
          display: flex;
          flex-wrap: wrap;
          gap: 10px;
          justify-content: center;
          margin-top: 18px;
        }
    
        button {
          padding: 12px 18px;
          border: 0;
          border-radius: 10px;
          font-size: 1rem;
          font-weight: bold;
          cursor: pointer;
          color: white;
          background: #4f46e5;
        }
    
        button:hover { filter: brightness(0.93); }
        button:disabled { opacity: 0.45; cursor: not-allowed; }
        .correct { background: #059669; }
        .review { background: #d97706; }
        .secondary { background: #64748b; }
        .hidden { display: none; }
    
        .results {
          padding: 32px 10px;
          text-align: center;
        }
    
        .score {
          margin: 16px 0;
          font-size: 2.2rem;
          font-weight: bold;
          color: #4f46e5;
        }
      </style>
    </head>
    <body>
      <main class="app">
        <section id="studyScreen">
          <h1>Family Study Flashcards</h1>
          <p class="instructions">Click the card to show the answer.</p>
          <p class="status" id="status"></p>
    
          <div class="progress-track">
            <div class="progress-bar" id="progressBar"></div>
          </div>
    
          <div class="card" id="card" tabindex="0" role="button">
            <div class="label" id="cardLabel">QUESTION</div>
            <div class="card-text" id="cardText"></div>
          </div>
    
          <div class="controls">
            <button class="secondary" id="previousButton">Previous</button>
            <button id="flipButton">Show Answer</button>
            <button class="secondary" id="nextButton">Next</button>
          </div>
    
          <div class="rating-controls hidden" id="ratingControls">
            <button class="correct" id="correctButton">I Got It</button>
            <button class="review" id="reviewButton">Review Again</button>
          </div>
        </section>
    
        <section class="results hidden" id="resultsScreen">
          <h1>Study Round Complete!</h1>
          <p>Your score is:</p>
          <div class="score" id="finalScore"></div>
          <p id="resultMessage"></p>
          <button id="restartButton">Study Again</button>
        </section>
      </main>
    
      <script>
        // EDIT ONLY THIS LIST TO ADD YOUR OWN FLASHCARDS.
        const flashcards = [
          { question: "What is photosynthesis?", answer: "The process plants use to turn light energy into food." },
          { question: "What is the capital of Washington State?", answer: "Olympia" },
          { question: "What is 8 × 7?", answer: "56" },
          { question: "What does 'analyze' mean?", answer: "To examine something carefully and in detail." },
          { question: "What is the formula for the area of a rectangle?", answer: "Length × width" }
        ];
    
        let currentIndex = 0;
        let showingAnswer = false;
        let correctCount = 0;
        let ratedCards = new Array(flashcards.length).fill(null);
    
        const card = document.getElementById("card");
        const cardLabel = document.getElementById("cardLabel");
        const cardText = document.getElementById("cardText");
        const status = document.getElementById("status");
        const progressBar = document.getElementById("progressBar");
        const flipButton = document.getElementById("flipButton");
        const previousButton = document.getElementById("previousButton");
        const nextButton = document.getElementById("nextButton");
        const ratingControls = document.getElementById("ratingControls");
    
        function displayCard() {
          showingAnswer = false;
          card.classList.remove("answer");
          cardLabel.textContent = "QUESTION";
          cardText.textContent = flashcards[currentIndex].question;
          flipButton.textContent = "Show Answer";
          ratingControls.classList.add("hidden");
          status.textContent = `Card ${currentIndex + 1} of ${flashcards.length} • Correct: ${correctCount}`;
          progressBar.style.width = `${((currentIndex + 1) / flashcards.length) * 100}%`;
          previousButton.disabled = currentIndex === 0;
          nextButton.disabled = currentIndex === flashcards.length - 1;
        }
    
        function flipCard() {
          showingAnswer = !showingAnswer;
    
          if (showingAnswer) {
            card.classList.add("answer");
            cardLabel.textContent = "ANSWER";
            cardText.textContent = flashcards[currentIndex].answer;
            flipButton.textContent = "Show Question";
            ratingControls.classList.remove("hidden");
          } else {
            card.classList.remove("answer");
            cardLabel.textContent = "QUESTION";
            cardText.textContent = flashcards[currentIndex].question;
            flipButton.textContent = "Show Answer";
            ratingControls.classList.add("hidden");
          }
        }
    
        function moveCard(direction) {
          currentIndex += direction;
          displayCard();
        }
    
        function rateCard(isCorrect) {
          if (ratedCards[currentIndex] === true) correctCount--;
          ratedCards[currentIndex] = isCorrect;
          if (isCorrect) correctCount++;
    
          if (currentIndex < flashcards.length - 1) {
            currentIndex++;
            displayCard();
          } else {
            showResults();
          }
        }
    
        function showResults() {
          document.getElementById("studyScreen").classList.add("hidden");
          document.getElementById("resultsScreen").classList.remove("hidden");
          document.getElementById("finalScore").textContent = `${correctCount} / ${flashcards.length}`;
    
          const reviewCount = flashcards.length - correctCount;
          document.getElementById("resultMessage").textContent = reviewCount === 0
            ? "Excellent work! Every card was answered correctly."
            : `${reviewCount} card${reviewCount === 1 ? "" : "s"} may need another review.`;
        }
    
        function restartStudy() {
          currentIndex = 0;
          correctCount = 0;
          ratedCards = new Array(flashcards.length).fill(null);
          document.getElementById("resultsScreen").classList.add("hidden");
          document.getElementById("studyScreen").classList.remove("hidden");
          displayCard();
        }
    
        card.addEventListener("click", flipCard);
        card.addEventListener("keydown", event => {
          if (event.key === "Enter" || event.key === " ") flipCard();
        });
        flipButton.addEventListener("click", flipCard);
        previousButton.addEventListener("click", () => moveCard(-1));
        nextButton.addEventListener("click", () => moveCard(1));
        document.getElementById("correctButton").addEventListener("click", () => rateCard(true));
        document.getElementById("reviewButton").addEventListener("click", () => rateCard(false));
        document.getElementById("restartButton").addEventListener("click", restartStudy);
    
        displayCard();
      </script>
    </body>
    </html>

    4. Add Your Own Questions and Answers

    Near the bottom of the code, find this section:

    const flashcards = [
      { question: "What is photosynthesis?", answer: "The process plants use to turn light energy into food." },
      { question: "What is the capital of Washington State?", answer: "Olympia" }
    ];

    Replace the sample text inside the quotation marks with your own study material. Each flashcard follows this pattern:

    { question: "Type the question here", answer: "Type the answer here" },

    For example, a vocabulary card could look like this:

    { question: "What does 'contrast' mean?", answer: "To identify differences between two or more things." },

    Be careful not to delete the quotation marks, braces, or comma. The final card in the list does not need a comma after it.

    5. Save the File Correctly in Windows

    In Notepad:

    1. Select File → Save As.
    2. Enter family-flashcards.html as the file name.
    3. Change Save as type to All Files.
    4. Select UTF-8 for the encoding.
    5. Save the file somewhere easy to find, such as the Desktop.

    The .html ending is important. If the file is saved as family-flashcards.html.txt, Windows will treat it as a text document instead of a web page.

    6. Open and Use the Flashcards

    Double-click family-flashcards.html. It should open in your default web browser.

    Read the question first and let your child answer without looking at the back. Click the card or select Show Answer. Then choose:

    • I Got It when the answer was correct
    • Review Again when the answer was incorrect or incomplete

    At the end, the program shows the number of correctly answered cards. Select Study Again to restart the complete set.

    7. A Simple Way to Use the Score

    The score is not meant to replace a school grade. I use it as a quick guide for deciding what needs more attention.

    For example:

    • 90–100%: Review briefly one more time before the test.
    • 70–89%: Repeat the cards that were difficult.
    • Below 70%: Break the material into a smaller set and study it in shorter sessions.

    This makes the study result easier to understand than relying on memory alone. Instead of wondering which questions caused trouble, a parent and child can immediately see whether another round would be helpful.

    One limitation is that the current version shows the total score but does not save it after the browser is closed. This is helpful for privacy because the information stays on the computer, but parents who want a long-term record should write the date and score in a notebook or spreadsheet.

    8. Troubleshooting Common Problems

    The code opens as text

    Check the file name. It must end in .html, not .txt. In File Explorer, enable View → Show → File name extensions if the ending is hidden.

    The page is blank or the buttons do not work

    A quotation mark, comma, brace, or bracket may have been deleted while adding questions. Compare the edited flashcard list with the original sample.

    An apostrophe causes a problem

    The template uses double quotation marks around each question and answer, so ordinary apostrophes in words such as child's should work. Avoid adding unescaped double quotation marks inside the question or answer. You can use single quotation marks inside the text instead.

    Changes do not appear

    Save the file in Notepad, return to the browser, and refresh the page. If an older version still appears, close the browser tab and open the HTML file again.

    Final Thoughts

    A study tool does not need to be complicated to be useful. This flashcard program puts the questions, answers, and results in one place while keeping the setup simple enough for a parent to manage.

    The most useful part for our family is the repeatable routine: read the question, say the answer, check it, and record the result. That structure makes it easier to return to material that was not remembered the first time. Because the program is only one HTML file, I can also make a separate copy for each subject or upcoming test without creating another online account.

    Start with five to ten cards. Once the tool is working, add more questions gradually and keep each answer short enough to review quickly.