topskill.dev
CoursesTracks
0
All courses/Introduction to HTMLInput Types: Build a Mission Profile
Forms
3 / 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

Input Types: Build a Mission Profile

The crew’s mission profile needs text, a contact email, an energy level, a date, and a beacon color. The completed index.html supplies labels and inputs for each. Run it to compare the browser controls, then inspect the type attributes that request them.

Read the code

html
<input type="number" min="1" max="100" step="1" />
<input type="date" />
<input type="color" value="#5b7cfa" />

The type tells the browser what kind of value belongs in the field. Here, min="1" and max="100" bound the energy level; step="1" requests whole-number increments. These constraints do not make an empty field invalid unless it is also required. Date and color picker appearance depends on the browser.

Try the preview

Run the demo. Number fields have number controls, date fields offer a date picker in supporting browsers, and the color field opens a picker.

Check your page

Change the color in the picker and choose a date. For a small code experiment, change the number field’s max to 10, Run, and try 11; the browser may let you type it but mark it invalid when checking the form. Typing a value and accepting it as valid are different things. Restore 100 afterward. This demo has no saving service. Do not submit personal information.

Next

Continue to Record Beacon Maintenance. You will recreate the same idea from a smaller starter file.

Files
  • ⋄index.html
Loading editor…