HTML and CSS · lesson 29 of 30 · free

Your first website — HTML and CSS for kids

A small website is just a folder of files. index.html is the home page with the HTML, style.css holds the CSS, and script.js holds the JavaScript. Link the CSS from the head and load the script with a script tag. Plan what to show, write the HTML, add styles, test in a web browser — save and refresh after every change — and then publish it online with a parent or teacher.

▶ Watch how it works

Got it? Practise ↓

Code tip

One file per job — “HTML in index.html, CSS in style.css, JavaScript in script.js”

  1. Tags → index.html; selector { … } → style.css; let, alert, console.log → script.js.
  2. Plan → write the HTML → add CSS → test in a browser → publish.
  3. Use small letters and dashes in file names; save and refresh to see changes.

Use it for: Building a hobby page, a class project site or a portfolio of your work.

Worked example: 🚀 Which file should this code go in: <p>Hello!</p> → index.html

  1. <p>Hello!</p> is an HTML tag with content.
  2. HTML goes in index.html.

Check: p { color: red; } would go in style.css ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 29 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 🚀 Website Launcher badge when you pass — and a certificate when you finish all 10 lessons of Part 3 · Web Development. You can still take the test without signing in.

🖨️ Web Worksheet: Your First Website

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 HTML and CSS classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Computer worksheets Flowcharts, block coding, spreadsheets and safe internet.