HTML
GIT
GH

HTML5 & Git/GitHub

A Complete 6-Day Course — From first webpage to professional version control, deployment, and job-ready best practices

5
HTML Days
1
Git Day
6
Total Days
Career Value
HTML Days 1–5 · Structure · Semantics · Forms · SEO · Accessibility Day 6 · Git · GitHub · Deploy · CI/CD Intro

★ New Topics Added: Semantic HTML5 · Accessibility / ARIA · SEO · Responsive Images · iframes · Data Attributes · Git Branching · Pull Requests · Vercel & GitHub Pages

Table of Contents

6 days · HTML (Days 1–5) + Git & GitHub (Day 6) · Original outline + extended topics for professional readiness

🌐

HTML — Hypertext Markup Language (Days 1–5)

The skeleton of every webpage. HTML provides meaning and structure to content — it tells the browser what things are, not how they look. CSS handles appearance; HTML handles meaning.

Day 01

Overview, Rules, Structure, Semantic Tags & Lists

What HTML is, how a valid document is structured, the difference between semantic and non-semantic elements, and organising content with lists

What is HTML?

HTML (HyperText Markup Language) is the standard language for creating web pages. It defines the structure and meaning of web content using elements — represented by tags. HTML is not a programming language. It has no logic, no variables, no functions. It is a markup language — you annotate content to describe what it is.

Every webpage you have ever visited — no matter how complex — begins with HTML. It has been the foundation of the web since Tim Berners-Lee invented it in 1991 at CERN. HTML5, the current standard, was finalised in 2014 and introduced powerful semantic elements, native audio/video support, form validation, and canvas drawing.

The "Hyper" in HyperText refers to hyperlinks — the ability to link documents together, which is what makes the web a web rather than a collection of isolated pages.

Rules of HTML
Structure of an HTML Document

Every valid HTML document has the same foundational skeleton. Each part has a specific purpose and location. Writing a page without this structure may work in some browsers but will fail validation and may behave unpredictably.

Complete HTML5 document structure — every part explained
<!-- DOCTYPE declaration — tells the browser this is HTML5 (not HTML4 or XHTML) --> <!DOCTYPE html> <html lang="en"> <!-- lang="en" tells browsers, search engines, and screen readers the page language --> <head> <!-- HEAD contains metadata — information ABOUT the page, not visible to users --> <meta charset="UTF-8"> <!-- UTF-8 character encoding: supports all languages, emojis, special characters --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Viewport: makes page responsive on mobile. WITHOUT this, mobile phones zoom out to show desktop width --> <title>My First Page | Valuemax Tech Academy</title> <!-- Title: appears in browser tab AND as the headline in Google search results --> <link rel="stylesheet" href="style.css"> <!-- Links external CSS file. rel="stylesheet" identifies what kind of link it is --> </head> <body> <!-- BODY contains everything visible to the user --> <header> <nav>...navigation links...</nav> </header> <main> <h1>Page Heading</h1> <p>A paragraph of content.</p> </main> <footer>...footer content...</footer> <!-- Script at the BOTTOM of body so it runs after HTML is parsed --> <script src="app.js" defer></script> </body> </html>
Indentation & Formatting Standards

HTML browsers ignore most whitespace — extra spaces, tabs, and blank lines are compressed to a single space in rendered output. However, proper indentation is absolutely essential for human readers. An unindented HTML file with 200 elements becomes impossible to understand and maintain.

The standard is 2 spaces per indentation level (some teams prefer 4 — be consistent within a project). Every child element is indented one level more than its parent. Closing tags align with their opening tag. Inline elements (<strong>, <a>, <span>) can stay on the same line as their content. Block elements (<div>, <p>, <section>) always get their own line.

Semantic vs. Non-Semantic Tags

This is one of the most important concepts in modern HTML. A semantic element carries meaning — it tells both the browser and the developer what the content is. A non-semantic element carries no meaning — it says nothing about its content.

Before HTML5, developers built entire layouts with <div> and <span> — meaning nothing. HTML5 introduced elements like <header>, <nav>, <main>, <article>, <section>, <aside>, and <footer> that describe purpose. This matters for three reasons: search engine rankings (Google understands your page structure), accessibility (screen readers navigate by landmarks), and developer experience (code is self-documenting).

Non-semantic vs Semantic layout
<!-- ❌ NON-SEMANTIC — no meaning, just boxes --> <div id="header"> <div id="nav"></div> </div> <div id="main-content"> <div class="article"></div> <div class="sidebar"></div> </div> <div id="footer"></div> <!-- ✅ SEMANTIC — every element describes its role --> <header> <nav></nav> </header> <main> <article></article> <aside></aside> </main> <footer></footer>
Semantic ElementPurposeNotes
<header>Introductory content or navigation at the top of a page or sectionA page can have multiple — one for the page, one inside an <article>
<nav>A set of navigation linksNot all groups of links — only major navigation blocks
<main>The dominant, unique content of the page bodyOnly ONE <main> per page. Never put it inside <header>, <nav>, <aside>, or <footer>
<article>Self-contained, independently distributable contentBlog posts, news articles, forum posts, product cards — content that makes sense on its own
<section>A thematic grouping of content with a headingChapters, tabs, or regions of a page. Should almost always have an <h2> or deeper heading inside
<aside>Content tangentially related to the surrounding contentSidebars, pull quotes, advertising, author bios — supplementary content
<footer>Footer of its nearest section or the pageTypically contains copyright, links, contact info
<figure> / <figcaption>Self-contained media (image, diagram, code) with optional captionLinks the caption to the media semantically for screen readers
<time>A specific time or date<time datetime="2024-03-15">March 15, 2024</time> — machine-readable
<address>Contact information for nearest <article> or <body>Physical address, email, phone, social links of the author/owner
Non-Semantic ElementPurposeWhen to Use
<div>Generic block-level container — no meaningLayout grouping when no semantic element fits. Used extensively with CSS classes.
<span>Generic inline container — no meaningStyling a portion of text inline (e.g., colouring one word) when no semantic tag fits.
✅ The rule: ask what the content IS, not how it looks. If it's navigation, use <nav>. If it's a blog post, use <article>. Only use <div> and <span> as a last resort when no semantic element describes the content.
Key Tags — Headings, Paragraphs & Comments
Headings, paragraphs, and comments
<!-- HEADINGS — h1 to h6, from most important to least --> <h1>The Page Title — ONE per page maximum</h1> <h2>Major Section Heading</h2> <h3>Sub-section Heading</h3> <h4>Sub-sub Heading</h4> <h5>Rarely used</h5> <h6>Almost never used</h6> <!-- PARAGRAPH — block-level text container --> <p> This is a paragraph. Each <p> tag creates its own block. Browsers add default top and bottom margin. Use CSS margin: 0 to remove if needed. </p> <!-- COMMENT — visible only in source code, not to the user --> <!-- Use comments to explain why code exists, not what it obviously does --> <!-- TODO: Replace this placeholder with real content from the API --> <!-- Line break — avoid using br for spacing (use CSS margin/padding instead) --> <p>First line<br>Second line — only use br inside poems, addresses, lyrics</p> <!-- Horizontal rule — thematic break between sections --> <hr>
Lists — Four Types

HTML has four types of lists, each for a different purpose. Lists are not just for bullets — they are the correct semantic element for any collection of related items: navigation menus, recipe ingredients, steps in a process, or definition glossaries. A navigation bar is technically an unordered list of links.

All four list types
<!-- 1. UNORDERED LIST — items without sequence (bullets) --> <ul> <li>Apples</li> <li>Oranges</li> <li>Mangoes</li> </ul> <!-- 2. ORDERED LIST — items with sequence (numbered) --> <ol> <li>Preheat oven to 180°C</li> <li>Mix dry ingredients</li> <li>Bake for 25 minutes</li> </ol> <!-- ol with custom start and type --> <ol start="5" type="A"> <!-- Starts at E, uses letters: E, F, G --> <li>Item E</li> <li>Item F</li> </ol> <!-- 3. NESTED LIST — list inside a list item --> <ul> <li>Nigeria <ul> <li>Lagos</li> <li>Abuja</li> <li>Port Harcourt</li> </ul> </li> <li>Ghana</li> </ul> <!-- The nested <ul> goes INSIDE the <li>, not after the closing </li> --> <!-- 4. DESCRIPTION/DEFINITION LIST — term + definition pairs --> <dl> <dt>HTML</dt> <dd>HyperText Markup Language — the structure of web pages</dd> <dt>CSS</dt> <dd>Cascading Style Sheets — the visual presentation of web pages</dd> </dl> <!-- dt = description term, dd = description definition. Used for glossaries, FAQs, metadata -->
💡 Navigation menus are always <nav><ul><li><a> — an unordered list of links inside a nav element. This is the semantically correct and universally expected structure for navigation in professional HTML.

✏️ Day 1 Exercise

  1. Create a properly structured HTML5 page with the correct DOCTYPE, charset, viewport meta, and title. Include: a <header> with a <nav>, a <main> section, and a <footer>.
  2. Inside the main section, add an h1 heading, two h2 sub-headings each with a paragraph, an unordered list of your skills, an ordered list of your career goals (steps 1 to 5), a nested list showing Nigeria → 3 cities, and a description list defining 4 HTML terms.
  3. Validate your HTML at validator.w3.org and fix every error before submission.

Day 02

Formatting Tags, Attributes, Links, Images, Audio & Video

Styling content semantically, understanding how attributes work, and embedding media

Formatting Tags — Semantic vs. Presentational

HTML has two types of text-level formatting elements: semantic (carry meaning — e.g. <strong> means "important," <em> means "stressed emphasis") and presentational (purely visual — e.g. <b> makes text bold without meaning "important"). Always prefer semantic elements — they help screen readers and search engines understand your content.

All text formatting tags
<!-- BOLD — strong has semantic weight (important), b is visual only --> <strong>Important warning: save your work regularly.</strong> <!-- ✅ Preferred --> <b>This text is visually bold but not semantically important.</b> <!-- ITALIC — em has semantic emphasis, i is visual/stylistic --> <em>Stress this word for meaning.</em> <!-- ✅ Preferred for emphasis --> <i>Book titles, technical terms, foreign words</i> <!-- Visual italics --> <!-- STRIKETHROUGH — del = deleted content (semantic), s = no longer accurate --> <del>Old price: ₦5,000</del> New price: ₦3,500 <!-- Shows content was removed --> <s>Out of stock</s> — Now available! <!-- SUPERSCRIPT and SUBSCRIPT --> <p>E = mc<sup>2</sup></p> <!-- Mathematical exponent --> <p>H<sub>2</sub>O (water)</p> <!-- Chemical formula --> <p>1st<sup>st</sup> October 2024</p> <!-- Ordinal numbers --> <!-- HIGHLIGHT/MARK — highlights text as if with a marker pen --> <p>Study <mark>these key terms</mark> for the exam.</p> <!-- ABBREVIATION — shows full text on hover --> <abbr title="HyperText Markup Language">HTML</abbr> <abbr title="Lagos State University">LASU</abbr> <!-- INLINE CODE — for displaying code snippets in text --> <p>Use the <code>console.log()</code> function to debug JavaScript.</p> <!-- BLOCKQUOTE and CITE --> <blockquote cite="https://source.com/quote"> <p>The only way to learn programming is to write programs.</p> <cite>— Dennis Ritchie</cite> </blockquote> <!-- SMALL — fine print, legal disclaimers --> <small>© 2026 Valuemax Tech Academy. All rights reserved.</small> <!-- INSERTED content — opposite of del --> <ins>This text was added to the document.</ins>
⚠️ The <center> tag is deprecated in HTML5 — it no longer exists as a valid element. Never use it. Use CSS text-align: center or margin: 0 auto for centring.
Understanding Attributes

An attribute provides additional information about an HTML element. Attributes always go inside the opening tag and follow the format name="value". Some attributes apply to every element (global attributes), while others are specific to certain elements.

Key global attributes every developer must know: id (unique identifier — one per page), class (reusable CSS/JS hook — many elements can share), style (inline CSS — avoid), title (tooltip on hover), lang (language of element content), hidden (hides element), tabindex (keyboard focus order), and data-* (custom data attributes — covered below).

Data Attributes — storing custom data in HTML NEW
<!-- data-* attributes store custom data for JavaScript to read --> <!-- Format: data-[your-name]="value" --> <button data-user-id="42" data-action="delete" data-confirm="true" >Delete User</button> <!-- Product card with multiple data attributes --> <div class="product-card" data-product-id="SKU-2024-001" data-price="5000" data-category="electronics" data-in-stock="true" > <h3>Wireless Earbuds</h3> <button class="add-to-cart">Add to Cart</button> </div> <!-- Reading data attributes with JavaScript --> <script> const card = document.querySelector('.product-card'); console.log(card.dataset.productId); // "SKU-2024-001" console.log(card.dataset.price); // "5000" </script>
Links — The <a> Tag

The anchor tag <a> creates hyperlinks — the defining feature of the web. Without links, webpages would be isolated islands. The href attribute specifies the destination. There are several types of links: external URLs, internal pages, same-page anchor jumps, email addresses, and telephone numbers.

All anchor tag patterns
<!-- External link — always use https. target="_blank" opens in new tab --> <a href="https://www.google.com" target="_blank" rel="noopener noreferrer"> Visit Google </a> <!-- rel="noopener noreferrer" is REQUIRED with target="_blank" for security. Without it, the opened page can access your window object (tab-napping attack) --> <!-- Internal link — relative path to another page in your project --> <a href="about.html">About Us</a> <a href="pages/contact.html">Contact</a> <a href="../index.html">Back to Home (go up one folder)</a> <!-- Same-page anchor link — jumps to element with matching id --> <a href="#contact-section">Jump to Contact</a> ... <section id="contact-section">...</section> <!-- Email link — opens default email client --> <a href="mailto:info@valuemax.com?subject=Enquiry&body=Hello,"> Email Us </a> <!-- Telephone link — opens phone app on mobile --> <a href="tel:+2348012345678">Call Us: 0801 234 5678</a> <!-- Download link — prompts file download --> <a href="files/brochure.pdf" download="ValueMax-Brochure.pdf"> Download Brochure </a> <!-- Image as a link --> <a href="https://example.com"> <img src="logo.png" alt="Example Website"> </a>
AttributeValuesEffect
hrefURL, relative path, #id, mailto:, tel:The destination. Without href, <a> is a placeholder link.
target_blank, _self, _parent, _top_blank = new tab. _self = same tab (default). _parent/_top = for frames (rare)
relnoopener noreferrer, nofollow, canonicalRelationship between pages. noopener noreferrer is security-critical with _blank.
downloadFilename string or booleanCauses file to download rather than navigate. Optional value sets the saved filename.
titleAny textTooltip text shown on hover.
Images — The <img> Tag

The <img> tag embeds an image. It is a void element — it has no closing tag. The src and alt attributes are mandatory for every image. The alt attribute is not optional decoration — it is a legal accessibility requirement in many jurisdictions and directly impacts SEO.

The alt text should describe what the image shows to someone who cannot see it: "A golden retriever puppy sitting on green grass" not "image123.jpg" or "photo." If the image is purely decorative and adds no information, use an empty alt: alt="" — this tells screen readers to skip it entirely.

Images — all attributes and responsive patterns
<!-- Basic image --> <img src="images/hero.jpg" alt="Students learning computer skills at Valuemax Tech Academy" width="800" height="450" > <!-- width and height help the browser reserve space before image loads, preventing layout shift (a Core Web Vitals metric that affects Google ranking) --> <!-- Responsive image with CSS --> <style> img { max-width: 100%; height: auto; display: block; } </style> <!-- Figure with caption — semantic way to include captioned images --> <figure> <img src="chart.png" alt="Bar chart showing revenue growth from 2022 to 2024"> <figcaption>Fig. 1 — Revenue growth from 2022 to 2024</figcaption> </figure> <!-- Responsive images with srcset — different sizes for different screens --> <img src="hero-800.jpg" srcset="hero-400.jpg 400w, hero-800.jpg 800w, hero-1200.jpg 1200w" sizes="(max-width: 600px) 400px, (max-width: 1000px) 800px, 1200px" alt="Hero image" > <!-- The browser chooses the most appropriate size — saves mobile data --> <!-- Lazy loading — images only load when near the viewport --> <img src="photo.jpg" alt="Photo" loading="lazy"> <!-- Image formats guide: JPEG — photos, complex images (lossy compression) PNG — logos, screenshots, images needing transparency SVG — icons, logos that need to scale without quality loss WebP — modern format, smaller than JPEG/PNG at same quality -->
Audio & Video
Audio and video with full attributes
<!-- AUDIO --> <audio src="podcast.mp3" controls <!-- Shows play/pause/volume UI. Required for user control --> autoplay <!-- Starts automatically (browsers block this without muted) --> muted <!-- Required for autoplay to work in modern browsers --> loop <!-- Plays on repeat --> preload="auto" <!-- none|metadata|auto — how much to preload --> > <!-- Fallback for browsers that don't support audio --> Your browser does not support the audio element. </audio> <!-- Multiple audio formats for browser compatibility --> <audio controls> <source src="audio.mp3" type="audio/mpeg"> <source src="audio.ogg" type="audio/ogg"> Your browser does not support audio. </audio> <!-- VIDEO --> <video src="promo.mp4" controls width="800" height="450" poster="thumbnail.jpg" <!-- Image shown before video plays --> muted playsinline <!-- Plays inline on iOS (not fullscreen) --> > <source src="promo.mp4" type="video/mp4"> <source src="promo.webm" type="video/webm"> <track src="captions.vtt" kind="captions" srclang="en" label="English"> <!-- <track> adds subtitles/captions for accessibility --> </video> <!-- Embedding YouTube / external videos using iframe --> <iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID" title="YouTube video: Introduction to HTML" frameborder="0" allowfullscreen loading="lazy" ></iframe>
How to Locate Files — Relative vs. Absolute Paths

Linking to the correct file location is one of the most common sources of broken images and links for beginners. There are two types of paths: absolute (full URL including domain) and relative (path from the current file's location).

File paths explained
<!-- Project folder structure: project/ ├── index.html ← you are here ├── about.html ├── css/ │ └── style.css ├── images/ │ ├── logo.png │ └── hero.jpg └── pages/ ├── contact.html └── services.html --> <!-- From index.html: --> <link rel="stylesheet" href="css/style.css"> <!-- go INTO css folder --> <img src="images/logo.png" alt="Logo"> <!-- go INTO images folder --> <a href="pages/contact.html">Contact</a> <!-- go INTO pages folder --> <a href="about.html">About</a> <!-- same folder --> <!-- From pages/contact.html: --> <link rel="stylesheet" href="../css/style.css"> <!-- ../ = go UP one level --> <img src="../images/logo.png" alt="Logo"> <!-- up then into images --> <a href="../index.html">Home</a> <!-- up to root --> <!-- Absolute path — works from any location but breaks if domain changes --> <img src="https://mysite.com/images/logo.png" alt="Logo">

✏️ Day 2 Exercise

  1. Create a multi-page project with at least 3 HTML pages (index.html, about.html, contact.html) and link them all to each other using relative paths in a navigation menu built with <nav><ul><li><a>.
  2. On the home page, add a hero image with proper alt text and a figure+figcaption. Include an embedded YouTube video using an iframe.
  3. Use at least 6 different text formatting tags semantically — mark important information with <strong>, abbreviations with <abbr>, and a quote with <blockquote>.
  4. Add your telephone number and email address as clickable links using tel: and mailto: protocols.

Day 03

Tables & Form Fundamentals

Organising data in rows and columns, merging cells, and building the structure of HTML forms with all input types

HTML Tables

HTML tables should be used only for tabular data — data that belongs in rows and columns, like a spreadsheet: schedules, pricing comparisons, results tables, financial data. Do not use tables for page layout (a practice from the 1990s that is now completely wrong). Use CSS Grid or Flexbox for layout.

A table has a clear structure: <table> wraps everything. <thead> holds the header row. <tbody> holds the data rows. <tfoot> holds summary or footer rows. Inside rows (<tr>), header cells use <th> and data cells use <td>. This structure is not optional — it matters for accessibility, CSS styling, and correct browser rendering of print and scroll behaviour.

Full table structure with accessibility
<!-- caption provides a title/description for the table --> <table> <caption>Student Exam Results — November 2024</caption> <thead> <tr> <th scope="col">Student Name</th> <th scope="col">Subject</th> <th scope="col">Score</th> <th scope="col">Grade</th> </tr> </thead> <tbody> <tr> <th scope="row">Amara Okafor</th> <!-- Row header --> <td>Mathematics</td> <td>87</td> <td>A</td> </tr> <tr> <th scope="row">Emeka Nwosu</th> <td>Physics</td> <td>72</td> <td>B</td> </tr> </tbody> <tfoot> <tr> <th scope="row">Class Average</th> <td>All Subjects</td> <td>79.5</td> <td>B+</td> </tr> </tfoot> </table>
Merging Cells — colspan and rowspan

colspan makes a cell stretch across multiple columns. rowspan makes a cell stretch down multiple rows. Both require careful planning — when you span cells, you must remove the equivalent number of regular cells from affected rows/columns or the table will break.

colspan and rowspan — merging cells
<!-- COLSPAN — span across multiple columns --> <table> <tr> <th colspan="3">Full Name</th> <!-- spans 3 columns --> <th>Score</th> </tr> <tr> <td>First</td> <td>Middle</td> <td>Last</td> <td>95</td> </tr> </table> <!-- ROWSPAN — span down multiple rows --> <table> <tr> <td rowspan="2">Lagos</td> <!-- spans rows 1 AND 2 --> <td>Ikeja</td> </tr> <tr> <!-- NO td here for first column — Lagos cell covers it --> <td>Victoria Island</td> </tr> <tr> <td>Abuja</td> <td>Maitama</td> </tr> </table>
HTML Forms — Introduction

An HTML form is a way to collect data from users and submit it to a server (or process it with JavaScript). Forms are the mechanism behind every login page, registration form, search bar, checkout process, and contact page on the web. Understanding forms thoroughly is one of the most important HTML skills.

The <form> element wraps all form controls. Key attributes: action — the URL where data is sent (server endpoint or empty for JS handling). methodGET (data visible in URL, bookmarkable, for searches) or POST (data in request body, for sensitive data like passwords). enctype="multipart/form-data" — required when the form includes file uploads.

All input type attributes — comprehensive reference
<form action="/submit" method="POST" novalidate> <!-- TEXT — single-line text input --> <label for="username">Username:</label> <input type="text" id="username" name="username" placeholder="Enter username" maxlength="30" required> <!-- PASSWORD — text is hidden with dots --> <label for="pwd">Password:</label> <input type="password" id="pwd" name="password" minlength="8" required autocomplete="current-password"> <!-- EMAIL — validates format: must contain @ and domain --> <input type="email" name="email" placeholder="you@example.com"> <!-- NUMBER — numeric input with min/max/step --> <input type="number" name="age" min="16" max="120" step="1"> <!-- RANGE — slider --> <label>Satisfaction: <output>5</output>/10</label> <input type="range" name="rating" min="1" max="10" value="5"> <!-- DATE — date picker --> <input type="date" name="dob" min="1900-01-01" max="2010-12-31"> <!-- MONTH / WEEK / TIME / DATETIME-LOCAL --> <input type="month" name="month"> <input type="time" name="appt-time"> <input type="datetime-local" name="booking"> <!-- RADIO — one choice from a group (same name links them together) --> <fieldset> <legend>Gender:</legend> <input type="radio" id="male" name="gender" value="male"> <label for="male">Male</label> <input type="radio" id="female" name="gender" value="female"> <label for="female">Female</label> </fieldset> <!-- CHECKBOX — multiple choices, each independently toggled --> <input type="checkbox" id="terms" name="terms" value="agree" required> <label for="terms">I agree to the Terms and Conditions</label> <!-- FILE — upload one or multiple files --> <input type="file" name="avatar" accept="image/*"> <input type="file" name="docs" accept=".pdf,.docx" multiple> <!-- COLOR — color picker --> <input type="color" name="favcolor" value="#e44d26"> <!-- SEARCH — search field with browser-specific styling --> <input type="search" name="q" placeholder="Search..."> <!-- TEL — telephone number (no format validation, use pattern= for that) --> <input type="tel" name="phone" pattern="[0-9]{11}" placeholder="08012345678"> <!-- URL — validates that input is a valid URL format --> <input type="url" name="website" placeholder="https://yoursite.com"> <!-- HIDDEN — sends data without showing to user --> <input type="hidden" name="csrf_token" value="abc123xyz"> <!-- SUBMIT --> <input type="submit" value="Create Account"> <input type="reset" value="Clear Form"> </form>
The <label> Element — Never Omit It

The <label> element is not optional decoration. It serves two critical functions: it creates a clickable area that focuses its associated input (improving usability, especially on mobile), and it provides the accessible name that screen readers announce when the input has focus — without it, blind users have no idea what to type in the field.

Always link a label to its input using matching for on the label and id on the input. Alternatively, wrap the input inside the label (implicit association). Never rely on placeholder text as a label — placeholders disappear when typing and are not read consistently by all screen readers.

Correct and incorrect label usage
<!-- ❌ No label — invisible to screen readers, small click target --> <input type="text" placeholder="First Name"> <!-- ✅ Explicit label — for= links to id= --> <label for="fname">First Name</label> <input type="text" id="fname" name="first_name"> <!-- ✅ Implicit label — input wrapped inside label --> <label> First Name <input type="text" name="first_name"> </label> <!-- ✅ Visually hidden label (for search bars where label would look odd) --> <label for="search" class="sr-only">Search the site</label> <input type="search" id="search" placeholder="Search..."> <!-- .sr-only CSS: position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0) -->

✏️ Day 3 Exercise

  1. Create a student results table with at least 5 students, 4 subjects, a total column, and an average row in the tfoot. Use colspan to merge the "Class Average" label across 2 columns, and rowspan to merge a "Term 1 Results" header down 3 rows on the left side.
  2. Create a partial registration form (structure only, no styling) with fields for: full name, email, password, date of birth, gender (radio), course (to be completed Day 4), and a terms checkbox. Every input must have a properly linked label.

Day 04

Forms Continued — Select, Textarea, Button, Fieldset & All Form Attributes

Completing the full form element toolkit and mastering every form attribute for validation and user experience

Select Dropdowns, Textarea, Button & Fieldset
Complete form elements — Part 2
<!-- SELECT — dropdown list --> <label for="course">Select Course:</label> <select id="course" name="course" required> <option value="">-- Please select a course --</option> <!-- Empty default --> <optgroup label="Foundational"> <option value="comp-basics">Computer Basics</option> <option value="ms-office" selected>Microsoft Office</option> </optgroup> <optgroup label="Web Development"> <option value="html-css">HTML &amp; CSS</option> <option value="javascript">JavaScript</option> </optgroup> </select> <!-- SELECT with multiple — hold Ctrl/Cmd to select multiple --> <select name="interests" multiple size="4"> <option value="web">Web Development</option> <option value="data">Data Analytics</option> </select> <!-- DATALIST — input with autocomplete suggestions (not a fixed dropdown) --> <label for="browser">Favourite Browser:</label> <input list="browsers" id="browser" name="browser"> <datalist id="browsers"> <option value="Chrome"><option value="Firefox"><option value="Safari"> </datalist> <!-- TEXTAREA — multi-line text input --> <label for="bio">About You:</label> <textarea id="bio" name="biography" rows="5" <!-- Initial visible height in lines --> cols="40" <!-- Initial visible width in characters (use CSS width instead) --> maxlength="500" minlength="20" placeholder="Tell us a little about yourself... (20–500 characters)" spellcheck="true" ></textarea> <!-- Note: textarea closing tag must be on same line as opening if you want no default text --> <!-- Control resize in CSS: resize: none | horizontal | vertical | both --> <!-- BUTTON — three types --> <button type="submit">Submit Form</button> <!-- submits the form (default inside a form) --> <button type="reset">Clear All Fields</button> <!-- resets form to defaults --> <button type="button">Custom JS Action</button> <!-- NO default behaviour — safe for JS events --> <!-- Button with icon (better than input type="submit") --> <button type="submit"> <img src="icons/send.svg" alt="" aria-hidden="true"> Send Message </button> <!-- FIELDSET and LEGEND — groups related form controls visually and semantically --> <fieldset> <legend>Delivery Address</legend> <label for="street">Street:</label> <input type="text" id="street" name="street"> <label for="city">City:</label> <input type="text" id="city" name="city"> </fieldset>
All Form Attributes — Complete Reference
AttributeApplies ToPurpose & Example
placeholdertext, email, password, search, tel, url, textareaHint text shown when the field is empty. Disappears on typing. Never use as a substitute for a label.
valueAll inputsSets the initial (or current) value of the field. For checkboxes/radios, the value submitted when checked.
nameAll inputsThe key used when submitting form data. Essential — without it, the field is not submitted.
requiredAll inputsBrowser prevents form submission if field is empty. <input required> or <input required="required">
readonlytext, textarea, othersUser can see but not edit the value. Value IS submitted with the form. Different from disabled.
disabledAll inputs, select, buttonPrevents interaction and value is NOT submitted. Visually greyed out.
maxlengthtext, password, email, search, url, tel, textareaMaximum number of characters allowed. Browser enforces it.
minlengthtext, password, email, search, url, tel, textareaMinimum characters required. Validated on submit.
min / maxnumber, date, time, range, monthMinimum and maximum allowed values. min="0" max="100"
stepnumber, range, date, timeIncrements for valid values. step="0.5" allows 0, 0.5, 1, 1.5...
autofocusAll inputsGives this input keyboard focus immediately when the page loads. Use on ONE field only.
multipleemail, file, selectAllows multiple values. Multiple emails separated by commas. Multiple files with file input.
patterntext, tel, email, url, password, searchRegular expression the value must match. pattern="[0-9]{11}" = exactly 11 digits.
autocompletetext inputs, formHints to browser/password manager: on|off|email|name|current-password|new-password|tel
acceptfileLimits file types in picker: accept="image/*", accept=".pdf,.docx"
checkedcheckbox, radioSets the initial checked state.
selectedoptionPre-selects an option in a dropdown.
rows / colstextareaInitial visible size. Use CSS for precise control.

✏️ Day 4 Exercise

  1. Build a complete student registration form with: name fields, email, password with confirmation, date of birth, gender (radio), phone (with pattern validation), course selection (grouped with optgroup), multiple interests (checkboxes in a fieldset), a bio textarea (minlength 30, maxlength 300), a profile picture upload (image types only), and a styled submit button. Every field must have proper labels, placeholder text, and appropriate validation attributes.
  2. Add a second fieldset for "Emergency Contact" with name, phone, and relationship (select dropdown). The fieldset should have a clear legend.

Day 05

Meta Tags, SEO, Favicon, Accessibility & Character Entities

Making pages findable, shareable, accessible to everyone, and technically complete

Meta Tags & Their Purpose

Meta tags live inside the <head> and provide information about the page to browsers, search engines, and social media platforms. They are invisible to users but critical for how your page behaves and how it appears in search results and social media shares.

The arrangement of meta tags in the head matters for performance. The charset must be first (browser must know encoding to parse anything else). The viewport meta must come early. Title should come before other meta for SEO tools. CSS links go after meta tags.

Complete meta tag arrangement — best practice order
<head> <!-- 1. CHARACTER SET — must be first! --> <meta charset="UTF-8"> <!-- 2. VIEWPORT — makes page responsive, essential for mobile --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- 3. TITLE — appears in tab AND as Google headline (50–60 chars ideal) --> <title>Web Development Course Nigeria | Valuemax Tech Academy</title> <!-- 4. SEO META TAGS --> <meta name="description" content="Learn professional web development in Lagos with Valuemax Tech Academy. HTML, CSS, JavaScript, and more. Flexible schedules, hands-on projects."> <!-- description: appears as the grey text under your title in Google (150–160 chars) --> <meta name="keywords" content="web development Lagos, HTML course Nigeria, JavaScript training"> <!-- keywords: largely ignored by Google now, still used by some minor search engines --> <meta name="author" content="Valuemax Tech Academy"> <meta name="robots" content="index, follow"> <!-- robots: index=allow in search results, follow=crawl all links --> <!-- Use "noindex, nofollow" for login pages, admin dashboards, thank-you pages --> <link rel="canonical" href="https://valuemax.com/courses/"> <!-- canonical: tells Google which URL is the "official" version if duplicate content exists --> <!-- 5. OPEN GRAPH (Social Sharing) — Facebook, WhatsApp, LinkedIn --> <meta property="og:type" content="website"> <meta property="og:title" content="Web Development Course Nigeria | Valuemax Tech Academy"> <meta property="og:description" content="Learn HTML, CSS, and JavaScript professionally in Lagos."> <meta property="og:image" content="https://valuemax.com/images/og-cover.jpg"> <!-- og:image: 1200×630px recommended. This image appears in WhatsApp/Facebook previews --> <meta property="og:url" content="https://valuemax.com/courses/"> <meta property="og:site_name" content="Valuemax Tech Academy"> <meta property="og:locale" content="en_NG"> <!-- 6. TWITTER/X CARD TAGS --> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:title" content="Web Development Course | Valuemax Tech Academy"> <meta name="twitter:description" content="Learn web development in Lagos professionally."> <meta name="twitter:image" content="https://valuemax.com/images/og-cover.jpg"> <meta name="twitter:site" content="@valuemaxcomms"> <!-- 7. THEME COLOUR — colour of browser chrome on mobile --> <meta name="theme-color" content="#e44d26"> <!-- 8. FAVICON --> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="icon" href="favicon-32.png" sizes="32x32"> <link rel="icon" href="favicon-16.png" sizes="16x16"> <link rel="apple-touch-icon" href="apple-touch-icon.png" sizes="180x180"> <link rel="icon" href="icon-192.png" sizes="192x192"> <link rel="manifest" href="site.webmanifest"> <!-- Free favicon generator: favicon.io or realfavicongenerator.net --> <!-- 9. PRECONNECT — speed up third-party resource loading --> <link rel="preconnect" href="https://fonts.googleapis.com"> <!-- 10. STYLESHEETS LAST in head --> <link rel="stylesheet" href="style.css"> </head>
Accessibility & Screen Reader Compatibility NEW

Web accessibility means building websites that everyone can use — including people with visual, auditory, motor, or cognitive disabilities. In 2026, accessibility is not optional. It is a legal requirement in many countries (WCAG 2.1 AA is the standard referenced in accessibility laws globally). Beyond legal compliance, accessible sites rank better in search engines, work better on all devices, and are simply better code.

Roughly 15% of the world's population has some form of disability. In Nigeria, this represents millions of potential users. A screen reader is a software program that reads page content aloud and allows keyboard-only navigation — used by people who are blind or have low vision. The most popular screen readers are NVDA (Windows, free), JAWS (Windows, professional), and VoiceOver (Mac/iOS, built-in).

ARIA attributes and accessibility patterns
<!-- ARIA = Accessible Rich Internet Applications ARIA attributes supplement HTML semantics when no native element fits --> <!-- aria-label — names an element that has no visible label text --> <button aria-label="Close navigation menu">✕</button> <button aria-label="Search the site">🔍</button> <!-- aria-labelledby — points to element that labels this one --> <h2 id="billing-heading">Billing Address</h2> <form aria-labelledby="billing-heading"> ... </form> <!-- aria-describedby — provides additional description --> <input type="password" aria-describedby="pwd-hint"> <p id="pwd-hint">Password must be at least 8 characters with one number.</p> <!-- aria-required — for custom UI when using role= --> <div role="textbox" aria-required="true"></div> <!-- aria-expanded — for expandable elements (menus, accordions) --> <button aria-expanded="false" aria-controls="mobile-menu">Menu</button> <nav id="mobile-menu" hidden>...</nav> <!-- aria-live — announces dynamic content updates to screen readers --> <div aria-live="polite" aria-atomic="true"> <!-- When JS updates content here, screen reader announces the new text --> <p id="form-status"></p> </div> <!-- aria-hidden — hides decorative elements from screen readers --> <span aria-hidden="true">★★★★★</span> <span class="sr-only">5 out of 5 stars</span> <!-- Visible only to screen readers --> <!-- LANDMARK ROLES — for custom elements that behave like semantic HTML --> <div role="banner"> <!-- Same as <header> --> <div role="navigation"><!-- Same as <nav> --> <div role="main"> <!-- Same as <main> --> <div role="contentinfo"><!-- Same as <footer> --> <!-- RULE: use native semantic HTML first. Only use role= when no HTML element fits --> <!-- SKIP LINK — keyboard users can skip directly to main content --> <a href="#main-content" class="skip-link">Skip to main content</a> <main id="main-content">...</main> <!-- .skip-link CSS: position:absolute; top:-999px; left:0; :focus { top:0; } — visible only when focused --> <!-- TABINDEX — controlling keyboard navigation order --> <div tabindex="0">Now focusable with keyboard</div> <!-- 0 = natural order --> <div tabindex="-1">Focusable by JS only</div> <!-- not in tab order --> <!-- NEVER use positive tabindex values (1, 2, 3) — disrupts natural order -->
Character Entities

Some characters have special meaning in HTML — < starts a tag, & starts an entity. To display these literally, or to show special characters not on the keyboard, you use HTML character entities. Format: &name; (named) or &#number; (numeric).

EntityCharacterWhen to Use
&lt;<Less-than sign. REQUIRED when showing HTML code in a page.
&gt;>Greater-than sign. Use in code examples.
&amp;&Ampersand. REQUIRED in URLs inside attributes and in text.
&quot;"Double quote. Use inside attribute values that use double quotes.
&apos;'Apostrophe. Use in attribute values with single quote delimiters.
&nbsp;[non-breaking space]Space that won't wrap. Use between values that must stay together: "20&nbsp;kg", "Section&nbsp;3.2"
&copy;©Copyright symbol in footers.
&reg;®Registered trademark.
&trade;Trademark symbol.
&mdash;Em dash — used in place of commas/brackets for parenthetical statements.
&ndash;En dash — used for ranges: pages 10–25, 2020–2024.
&hellip;Ellipsis (three dots as one character).
&#8358;Nigerian Naira symbol (no named entity — use numeric).
&pound;£British pound sign.
&euro;Euro sign.

✏️ Day 5 Exercise

  1. Add a complete, properly ordered head section to all your project pages with: charset, viewport, title (50–60 characters), meta description (150–160 characters), Open Graph tags (og:title, og:description, og:image, og:url), and all favicon sizes (16×16, 32×32, 180×180, 192×192).
  2. Generate a real favicon from your initials or a simple logo at favicon.io. Export all required sizes. Add all the link tags to your HTML.
  3. Add a skip link, ensure all images have meaningful alt text, and add aria-label to all icon-only buttons on your project pages. Test keyboard navigation by pressing Tab through your page.
  4. Run your pages through the Wave Accessibility Checker at wave.webaim.org and fix all errors reported.
  5. Add character entities for: the copyright notice in your footer, the Naira currency symbol (₦) in any price on your page, and display a block of HTML code (with < and > characters) inside a <code> or <pre> element.
🔀

Git & GitHub — Version Control & Deployment (Day 6)

Git is the most important tool in a developer's workflow. It tracks every change to your code, lets you collaborate with a team, and provides a safety net that allows you to undo mistakes from any point in time. GitHub hosts your repositories online and is where most of the world's open-source code lives.

Day 06

Git, GitHub, Commands, Branching, Pull Requests & Deployment

Everything from installation to professional workflow, deployment, and collaborative development

What is Git? What is GitHub?

Git is a distributed version control system created by Linus Torvalds (the creator of Linux) in 2005. It tracks changes to files over time, allowing you to see exactly what changed, when, and by whom. It allows you to create multiple independent lines of development (branches), merge them together, and undo any mistake by travelling back in time to any previous state of your project.

Think of Git as a very sophisticated "Save As" system. Instead of save_v1.html, save_v2.html, save_final.html, save_final_REAL.html, Git gives you a single file with a complete, searchable history of every version ever saved — along with descriptions of what each change accomplished.

GitHub is a cloud platform that hosts Git repositories. It is where you push your local Git history so it is backed up online and accessible from any computer. GitHub adds features on top of Git: a web interface to browse code, Pull Requests (a formal code review process), Issues (bug tracking), Actions (automated CI/CD pipelines), GitHub Pages (free website hosting), and a social network of developers sharing code.

The relationship: Git is the tool (software on your computer). GitHub is the hosting service (a website). You use Git locally to track your work, then push to GitHub to share and back up. Alternatives to GitHub include GitLab (popular for private enterprise) and Bitbucket (popular with Atlassian tools like Jira), but GitHub has the largest community and the most open-source projects.

AspectGitGitHub
TypeSoftware tool (runs on your computer)Web platform / cloud service
Works without the other?Yes — Git works offline, locallyNo — GitHub requires Git to push/pull
Free?Yes — completely free and open sourceFree for public and private repos (up to certain limits)
Made by?Linus Torvalds, 2005Tom Preston-Werner et al., 2008 (acquired by Microsoft 2018)
Primary functionVersion control — tracking changes locallyHosting, collaboration, code review, deployment
Installing Git & Setting Up GitHub
Installation and first-time configuration
# ── Step 1: Download and Install Git ────────────────────────────────── # Windows: download from https://git-scm.com/download/win # Install with defaults. "Git Bash" is installed alongside — use this as your terminal. # Mac: git is often pre-installed. Or: brew install git # Ubuntu/Linux: sudo apt install git # ── Step 2: Verify installation ──────────────────────────────────────── git --version # Output: git version 2.43.0 # ── Step 3: Configure your identity — REQUIRED before first commit ──── git config --global user.name "Your Name" git config --global user.email "you@email.com" # --global applies to all repositories on your computer # This name and email appears in every commit you make — use your real name # Set default branch name to "main" (instead of older default "master") git config --global init.defaultBranch main # Set VS Code as default editor (for writing commit messages) git config --global core.editor "code --wait" # View all your configuration settings git config --list # ── Step 4: Create GitHub account ────────────────────────────────────── # Go to github.com → Sign up # Use a professional email and username — this is your developer identity # Add a profile picture and bio — GitHub is your developer portfolio
Core Git Commands — New Project Workflow

Git tracks your project through a three-stage pipeline: Working Directory (where you edit files), Staging Area (files queued for the next snapshot), and Repository (the permanent history of snapshots). Understanding this three-stage model is the key to understanding every Git command.

1

Working Directory

Where you create and edit files. Git watches this folder but does NOT track changes automatically.

2

Staging Area (Index)

Files you explicitly add with git add are "staged" — queued for the next commit. You can stage some files but not others.

3

Repository (.git folder)

When you git commit, staged changes are permanently saved as a snapshot. Every commit has a unique ID (SHA hash), author, timestamp, and message.

4

Remote Repository (GitHub)

git push sends your local commits to GitHub. git pull brings remote changes to your local machine.

Git workflow — starting a new project
# ══════════════════════════════════════════════════════════════════════ # STARTING A NEW PROJECT FROM SCRATCH # ══════════════════════════════════════════════════════════════════════ # Navigate to your project folder in the terminal cd Desktop/my-website # Initialize a new Git repository in the current folder # This creates a hidden .git folder that stores all version history git init Initialized empty Git repository in /Desktop/my-website/.git/ # Check the current state of your repository git status On branch main Untracked files: (use "git add ..." to include in what will be committed) index.html style.css # Stage a specific file git add index.html # Stage multiple specific files git add index.html style.css app.js # Stage ALL changes (new files, modifications, deletions) git add . # The dot means "everything in the current directory and subdirectories" # Unstage a file (remove from staging, keep changes in working directory) git restore --staged index.html # Create a commit — a permanent snapshot of all staged changes git commit -m "Add initial HTML structure and CSS styles" [main (root-commit) a3b4c5d] Add initial HTML structure and CSS styles 2 files changed, 45 insertions(+) create mode 100644 index.html create mode 100644 style.css # -m provides the message inline. Without -m, Git opens your text editor. # COMMIT MESSAGE RULES: # - Use imperative mood: "Add feature" not "Added feature" # - Max 50 characters in subject line # - Describe WHAT and WHY, not HOW # ✅ Good: "Add contact form with validation" # ❌ Bad: "fixed stuff" / "update" / "changes" / "WIP" # View the commit history git log commit a3b4c5d (HEAD -> main) Author: Your Name <you@email.com> Date: Mon Jan 15 10:30:00 2026 +0100 Add initial HTML structure and CSS styles commit f1e2d3c Initial project setup # Compact one-line log — shows all commits in a readable summary git log --oneline --graph --all * a3b4c5d (HEAD -> main) Add contact form with validation * f1e2d3c Add CSS navigation styles * 9a8b7c6 Initial project setup # See what changed in a specific file git diff index.html # See changes in staging area (before committing) git diff --staged # Connect local repository to GitHub remote git remote add origin https://github.com/yourusername/my-website.git # "origin" is the conventional name for your main remote repository # Push your commits to GitHub for the first time git push -u origin main # -u sets origin/main as the upstream (tracking branch) # After this first push, just use: git push # ══════════════════════════════════════════════════════════════════════ # CLONING AN EXISTING PROJECT FROM GITHUB # ══════════════════════════════════════════════════════════════════════ # Clone creates a full local copy including all history git clone https://github.com/username/repository-name.git # Clone into a specific folder name git clone https://github.com/username/repo.git my-project # ══════════════════════════════════════════════════════════════════════ # DAILY WORKFLOW — UPDATING AN EXISTING PROJECT # ══════════════════════════════════════════════════════════════════════ # Always start by pulling the latest changes from GitHub git pull # ... make your changes to files ... git status # Check what changed git add . # Stage all changes git commit -m "Add responsive navigation menu" git push # Push to GitHub # ── UNDOING MISTAKES ────────────────────────────────────────────────── # Discard unsaved changes in working directory (PERMANENT — cannot undo) git restore index.html # Undo the last commit but keep the changes staged (soft reset) git reset --soft HEAD~1 # Undo the last commit and unstage changes (mixed reset — changes preserved) git reset HEAD~1 # Create a new "undo" commit that reverses a previous one (safe for shared repos) git revert a3b4c5d # Reverses the commit with that hash
.gitignore — Excluding Files from Git NEW

Some files should never be committed to Git: API keys and passwords (security risk), node_modules folders (enormous and automatically re-generated), operating system files (.DS_Store, Thumbs.db), build output folders (dist/, build/), and editor configuration files (.idea/, .vscode/ in some cases). The .gitignore file tells Git to completely ignore specified files and folders as if they don't exist.

Create a .gitignore file in the root of your project. You can generate comprehensive templates for any framework or language at gitignore.io.

.gitignore file — patterns and examples
# Create the .gitignore file in your project root # Lines starting with # are comments # Each line specifies a pattern of files/folders to ignore # ── OPERATING SYSTEM FILES ────────────────────────── .DS_Store # Mac OS metadata files Thumbs.db # Windows thumbnail cache desktop.ini # Windows folder config # ── SENSITIVE FILES — NEVER commit these ──────────── .env # Environment variables (API keys, passwords, DB credentials) .env.local .env.production secrets.json config/credentials.yml # ── NODE.JS / NPM ─────────────────────────────────── node_modules/ # Can be 500MB+, always regenerated with npm install npm-debug.log package-lock.json # Sometimes included, sometimes not — team decision # ── BUILD OUTPUT ──────────────────────────────────── dist/ # Built/compiled files build/ .cache/ *.min.js # Minified files (generated from source) # ── EDITOR FILES ──────────────────────────────────── .idea/ # JetBrains IDEs *.swp # Vim swap files # ── SPECIFIC PATTERNS ─────────────────────────────── *.log # All .log files temp/ # Any folder named temp /temp/ # Only the temp folder in the project root !important.log # Exception: DO track important.log even though *.log is ignored # ── CHECKING WHAT IS IGNORED ──────────────────────── git status --ignored git check-ignore -v filename.txt # See WHICH rule is ignoring this file # ── IF YOU ACCIDENTALLY COMMITTED SOMETHING TO IGNORE ── git rm --cached .env # Remove from Git tracking but KEEP the file git commit -m "Remove .env from tracking"
🚨 Never commit API keys, passwords, or .env files to GitHub. Even if you delete them in a later commit, they remain visible in the commit history. If you accidentally push credentials, revoke them immediately, then use git filter-branch or BFG Repo Cleaner to purge the history.
Branching, Merging & Pull Requests NEW

A branch is an independent line of development. Think of your main branch as the published, working version of your project. When you want to add a new feature or fix a bug, you create a new branch — your own private workspace where you can experiment freely without affecting the main version. When the work is complete and reviewed, you merge the branch back.

This is the foundation of professional development. No professional developer pushes directly to the main branch. They create a feature branch, develop in isolation, and submit a Pull Request (PR) on GitHub for code review before merging. Even solo developers benefit from branches because they allow you to pause work on one feature and switch to another instantly.

Branching and merging
# ── VIEWING BRANCHES ────────────────────────────────────────────────── git branch # List local branches (* = current branch) * main feature/contact-form git branch -a # List all branches including remote # ── CREATING AND SWITCHING BRANCHES ─────────────────────────────────── # Modern Git (2.23+) — use switch instead of checkout git switch -c feature/contact-form # Create AND switch to new branch # Naming conventions: feature/description | bugfix/issue-number | hotfix/critical-bug git switch main # Switch to an existing branch git switch - # Switch back to the previous branch (handy shortcut) # Old syntax (still works): git checkout -b feature/contact-form # ── WORKING ON YOUR BRANCH ──────────────────────────────────────────── git switch -c feature/contact-form # ... add contact form to index.html ... git add . git commit -m "Add contact form with name, email, and message fields" git push -u origin feature/contact-form # Push branch to GitHub # ── MERGING BACK INTO MAIN ──────────────────────────────────────────── git switch main # Switch back to main first git pull # Get latest changes from remote main git merge feature/contact-form # Merge feature branch into main Updating f1e2d3c..a3b4c5d Fast-forward index.html | 25 ++++++++++++++ style.css | 8 +++++ git push # Push merged main to GitHub # Delete the branch after merging (clean up) git branch -d feature/contact-form git push origin --delete feature/contact-form # Delete remote branch too # ── MERGE CONFLICTS ─────────────────────────────────────────────────── # A conflict occurs when two branches modified the SAME lines differently git merge feature/nav CONFLICT (content): Merge conflict in index.html Automatic merge failed; fix conflicts and then commit the result. # Open index.html — Git marks the conflict: <<<<<<< HEAD # Your current branch content <nav class="main-nav"> ======= # Separator <nav class="top-nav"> # Incoming branch content >>>>>>> feature/nav # Resolve: edit the file to keep the correct version, remove the markers <nav class="main-nav"> # Keep what you want git add index.html # Mark conflict as resolved git commit -m "Merge feature/nav — keep main-nav class name"
Pull Requests — The Professional Code Review Process

A Pull Request (PR) is a formal request to merge your branch into the main branch, submitted through GitHub's web interface. It gives teammates an opportunity to review your code, leave comments, request changes, and approve it before it becomes part of the official project. PRs are the standard workflow in every professional development team.

Even when working alone, creating PRs is a good habit — it creates a documented history of what you added and why, forces you to review your own code before merging, and prepares you for team environments.

Pull Request workflow
# ── CREATING A PULL REQUEST ─────────────────────────────────────────── # Step 1: Push your feature branch to GitHub git push -u origin feature/add-gallery # Step 2: Go to GitHub.com → your repository # GitHub shows a banner: "Compare & Pull Request" → click it # Or: Pull Requests tab → New Pull Request → select your branch # Step 3: Fill in the PR form: # Title: Clear summary — "Add image gallery with lightbox feature" # Description: ## What this PR does - Adds a 3-column responsive image gallery to the portfolio page - Implements lightbox on image click using CSS transitions - Adds 8 project screenshots in optimised WebP format ## Screenshots [Attach before/after screenshots] ## Testing - Tested on Chrome, Firefox, Safari - Mobile responsive at 375px, 768px, 1200px - All images have alt text (WCAG AA compliant) ## Related Issue Closes #14 # Step 4: Request reviewers (if working in a team) # Step 5: Wait for approval, address feedback in new commits to the same branch # Step 6: Once approved → Merge Pull Request → Confirm Merge → Delete Branch # ── REVIEWING SOMEONE ELSE'S PR ─────────────────────────────────────── # On GitHub: Pull Requests → click the PR → Files Changed tab # Green lines = added. Red lines = removed. # Click the + next to any line to add an inline comment # Review tab → "Comment" (no decision) | "Approve" | "Request changes"
Deployment — GitHub Pages & Vercel

Deployment means making your website accessible on the internet with a real URL that anyone can visit. Both GitHub Pages and Vercel are free for static websites (HTML, CSS, JavaScript files — no server-side processing). They are the standard choice for student portfolios, project showcases, and small business websites.

GitHub Pages — deploying directly from your repository
# ══════════════════════════════════════════════════════════════════════ # METHOD 1: GitHub Pages — Automatic deployment from main branch # ══════════════════════════════════════════════════════════════════════ # Prerequisites: # - Your repository must be PUBLIC (free plan) or GitHub Pro # - Your main HTML file must be named index.html in the repository root # Steps (done on GitHub.com): # 1. Go to your repository → Settings tab # 2. Left sidebar → Pages # 3. Source: "Deploy from a branch" # 4. Branch: "main" | Folder: "/ (root)" # 5. Click Save # 6. Wait 1–3 minutes for deployment # 7. Your URL: https://yourusername.github.io/repository-name/ # After any future push to main, GitHub automatically redeploys in ~2 minutes # Special repository name for custom URL: # Name your repo exactly: yourusername.github.io # The URL becomes: https://yourusername.github.io (no /repo-name/) # Use this for your main portfolio page # Check deployment status: # Repository → Actions tab → see "pages build and deployment" workflow # ══════════════════════════════════════════════════════════════════════ # METHOD 2: Vercel — More powerful, custom domains, instant preview URLs # ══════════════════════════════════════════════════════════════════════ # Prerequisites: # - Vercel account (free) at vercel.com — sign up with your GitHub account # Steps: # 1. Go to vercel.com → New Project # 2. Import your GitHub repository → click "Import" # 3. Vercel auto-detects project type. For a plain HTML site: # Framework Preset: "Other" # Build Command: (leave empty) # Output Directory: . (current directory) # 4. Click Deploy # 5. Your URL: https://project-name.vercel.app # Vercel advantages over GitHub Pages: # ✅ Every branch gets its own preview URL (great for PRs) # ✅ Custom domains with automatic HTTPS/SSL # ✅ Better performance (global CDN, edge network) # ✅ Supports Node.js serverless functions (APIs) # ✅ Faster deployment (seconds, not minutes) # ✅ Deploy from any branch, not just main # After deployment — any push to main automatically redeploys on both platforms
Professional Git Workflow — The Full Picture NEW

The GitHub Flow is the most widely used workflow for web projects. It is simple enough for individuals but scales to teams of hundreds. Master this workflow and you are ready for any professional development environment.

Complete professional workflow — from task to deployed
# ══════════════════════════════════════════════════════════════════════ # THE GITHUB FLOW — one complete cycle # ══════════════════════════════════════════════════════════════════════ # Step 1: Start from an up-to-date main branch git switch main git pull # Step 2: Create a descriptive branch for your task git switch -c feature/add-portfolio-section # Branch naming: feature/ bugfix/ hotfix/ chore/ docs/ test/ # Step 3: Make small, focused commits as you work git add portfolio.html git commit -m "Add portfolio grid layout HTML structure" git add style.css git commit -m "Add CSS grid styles for portfolio section" git add images/ git commit -m "Add 6 portfolio project screenshots (WebP, 800x600)" # Small commits = easier to review, easier to identify when a bug was introduced # Step 4: Push regularly (backup + enables PR preview) git push -u origin feature/add-portfolio-section # Step 5: Create a Pull Request on GitHub # → Write a good description (what, why, screenshots) # → Request review from a teammate (or review your own code the next day) # Step 6: Merge and clean up git switch main git pull # Get the merged changes git branch -d feature/add-portfolio-section # ── USEFUL ADDITIONAL COMMANDS ──────────────────────────────────────── # See who changed what line (blame) git blame index.html # Shows each line's last author and commit # Find which commit introduced a bug using binary search git bisect start git bisect bad HEAD # Current commit has the bug git bisect good a3b4c5d # This old commit was fine # Git checks out commits in the middle — you test each one # git bisect good / git bisect bad until Git finds the culprit git bisect reset # Exit bisect mode # Temporarily save work without committing (to switch branches) git stash # Stash current uncommitted changes git stash list # See stashed work git stash pop # Restore last stash and remove it git stash apply stash@{0} # Apply a specific stash without removing it # Edit the last commit message (before pushing) git commit --amend -m "Corrected commit message" # Add forgotten files to the last commit (before pushing) git add forgotten-file.html git commit --amend --no-edit
Git CommandWhat It DoesWhen to Use
git initCreates a new Git repository in current folderStarting a brand new project from scratch
git clone [url]Downloads a complete copy of a remote repositoryJoining an existing project or working on a new computer
git statusShows current state: staged, unstaged, untracked filesBefore every git add — know what you're staging
git add .Stages all changes in current directoryBefore committing — after verifying git status
git commit -m "message"Saves a permanent snapshot of staged changesAfter completing a logical unit of work
git pushUploads local commits to remote repositoryAfter committing — to back up and share
git pullDownloads remote changes and merges into localStart of every work session, and before creating a branch
git log --onelineShows compact commit historyReviewing recent changes, finding a commit hash
git switch -c [branch]Creates a new branch and switches to itStarting any new feature or bug fix
git merge [branch]Incorporates changes from another branchAfter a feature is complete and reviewed
git stashTemporarily saves uncommitted workWhen you need to switch tasks but aren't ready to commit
git restore [file]Discards working directory changes for a fileUndoing unwanted changes before staging

✏️ Day 6 Exercise

  1. Setup: Install Git. Configure your name, email, and default branch to "main." Create a GitHub account with a professional username.
  2. First Repository: Create a folder for your HTML project. Run git init. Add all your HTML files. Make your first commit with a meaningful message. Create a repository on GitHub. Add the remote origin. Push your project.
  3. .gitignore: Create a .gitignore file in your project that ignores: .DS_Store, Thumbs.db, .env, and a /temp/ folder. Commit and push it.
  4. Branching: Create a branch called feature/about-page. Add a new about.html page. Make two focused commits on this branch. Push the branch to GitHub. Create a Pull Request on GitHub with a description of what you added. Merge it yourself.
  5. GitHub Pages Deployment: Enable GitHub Pages for your repository. Wait for deployment. Share the live URL (https://yourusername.github.io/repository-name/) with your instructor.
  6. Vercel Deployment: Sign up at vercel.com using your GitHub account. Import your repository. Deploy it. Share the Vercel URL alongside the GitHub Pages URL.
  7. Collaboration Practice: Exchange GitHub repository URLs with a classmate. Clone their repository. Create a branch called bugfix/typo-fix. Fix one typo or formatting issue in their HTML. Commit, push, and open a Pull Request to their repository.