HTML bootcamp · Lab 15

A checkbox option

easyInput Types8 minLesson: Input Types

Read the question, write HTML on the right, then Preview or Check.

QuestionHint and solution stay closed until you open them

Add a checkbox named subscribe with a label that reads "Subscribe to news".

Wrapping the <input> inside the <label> makes the whole text clickable — better for everyone.

Output. A label containing a checkbox named subscribe.

Examples

Example 1
Expected
<label><input type="checkbox" name="subscribe"> Subscribe to news</label>
Hint
  1. <input type="checkbox" name="subscribe">
  2. Put the input inside a <label> with the visible text.
Show correct code

Peek only after you have tried. You can still Check your own version.

<label><input type="checkbox" name="subscribe"> Subscribe to news</label>
index.htmlLive preview · Check reads the DOM
ResultIdle
Run to see output. Check grades the tests.