topskill.dev
CoursesTracks
0
All courses/Introduction to HTMLResponse Controls: Send a Mission Reply
Forms
7 / 11
← Introduction to HTML
○What Is HTML? See Tags in Action○Build the Meridian Signal○Complete HTML5 Page Structure○Build a Complete HTML5 Page✦Module Quiz
○Heading Hierarchy: H1 and H2○Extend the Signal Brief○Paragraphs and Inline Tags○Write Meridian's Survey Notes○List Types: Steps, Items, and Terms○Build a Crew Member Loadout○Challenge: Transmit a Rescue Signal✦Module Quiz
○Hyperlinks○Links between project files○Images○Applying Styles to HTML✦Module Quiz
○Div and Span○HTML Tables○Classes and IDs○Review: Structured Profile✦Module Quiz
○Project 1 - Visiting Card Structure○Project 1 - Visiting Card Actions✦Module Quiz
○The Head Element and Page Title○Meta Tags○HTML Entities✦Module Quiz
○Form Basics: Join the Meridian Relay○Build a Night-Shift Check-In○Input Types: Build a Mission Profile○Record Beacon Maintenance○Choice Controls: Select Training Modes○Plan a Supply Pickup●Response Controls: Send a Mission Reply○Build a Rescue Dispatch Report○Form validation and submission○Challenge: Send an Emergency Beacon✦Module Quiz
○Project 2 - Contact Us Form Structure○Project 2 - Contact Us Form Actions✦Module Quiz
○Embedding Video○Embedding Audio○Iframes✦Module Quiz
○Semantic HTML Tags○Details, Figure, and Figcaption○A keyboard-friendly page✦Module Quiz
○Project 3 - Resume Semantic Structure○Project 3 - Resume Links and Actions✦Module Quiz

Response Controls: Send a Mission Reply

Some answers do not fit a single-line input. The completed index.html lets the crew write a briefing, choose a role, and use base suggestions without being limited to them. Run it and compare the three controls.

Read the code

html
<label for="reading-notes">Reading notes</label>
<textarea id="reading-notes" name="notes" rows="4"></textarea>
<label for="reading-room">Reading room</label>
<select id="reading-room" name="room">
  <option value="quiet">Quiet room</option>
  <option value="group" selected>Group room</option>
</select>
<label for="shelf">Preferred shelf</label>
<input id="shelf" name="shelf" list="shelves">
<datalist id="shelves">
  <option value="Fiction"></option>
  <option value="Travel"></option>
</datalist>

The fragment above uses library choices rather than your crew’s reply. The completed index.html shows the full form. Use a textarea for multi-line text, a select for a fixed choice, and a datalist for suggestions. rows sets the textarea’s visible height, not a maximum answer length. A select normally displays its first option; selected lets you choose a different default.

The input’s list must match the datalist’s id. Unlike a select, it still accepts text that is not in the suggestions. Give each submitted control a name; the datalist itself is only a source of suggestions.

Try the preview

Run the demo. The briefing box allows multiple lines; Rescue is already selected; typing in the base field reveals suggested locations.

Check your page

Type two lines in the briefing, choose Scout, and type a base not listed in the suggestions. All three should remain editable. Suggestion popups vary by browser; the typed base is allowed even if no popup appears. This page does not send a reply.

Next

Continue to Build a Rescue Dispatch Report. You will recreate the same idea from a smaller starter file.

Files
  • ⋄index.html
Loading editor…