HTML and CSS · lesson 21 of 30 · free

Forms and inputs — HTML and CSS for kids

Forms let visitors type and choose things — a sign-up page, a quiz or a feedback box. A form holds input tags, and the type attribute decides the kind of box: text for words, password to hide what you type, email, number, date, checkbox to tick many choices, radio to pick only one, and submit to send the form. A label names each box.

▶ Watch how it works

Got it? Practise ↓

Code tip

Pick the right box — “each input type is made for one kind of answer”

  1. <form> holds <input> tags; type= picks the kind: text, password, email, number, date …
  2. Radio buttons with the same name allow only ONE choice; checkboxes allow many.
  3. type="submit" makes the send button; <label> names a box.

Use it for: Making quizzes, sign-up pages, polls and feedback forms.

Worked example: 📝 At most, how many of these can be chosen at the same time?
<form>
  <input type="radio" name="fruit"> Banana
  <input type="radio" name="fruit"> Litchi
  <input type="radio" name="fruit"> Guava
  <input type="radio" name="fruit"> Mango
</form> → 1

  1. These are radio buttons with the same name.
  2. Radio buttons let you pick only one.

Check: With checkboxes all 4 could be ticked ✓

▶ 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 21 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 📝 Form Field Pro 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.

🖨️ HTML Worksheet: Forms and Inputs

✨ 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.