Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Attributes

0/1

HTML Paragraphs

0/1

HTML Formatting

0/1

HTML Comments

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML Symbols

0/1
Text lesson

The min and max Attributes

The min and max attributes designate the minimum and maximum values for an input field.

These attributes are compatible with input types such as number, range, date, datetime-local, month, time, and week.

Tip: Employ the max and min attributes simultaneously to establish a range of acceptable values.

Example

Define a maximum date, a minimum date, and a range of valid values:

<form>
  <label for=”datemax”>Enter a date before 1980-01-01:</label>
  <input type=”date” id=”datemax” name=”datemax” max=”1979-12-31″><br><br>

  <label for=”datemin”>Enter a date after 2000-01-01:</label>
  <input type=”date” id=”datemin” name=”datemin” min=”2000-01-02″><br><br>

  <label for=”quantity”>Quantity (between 1 and 5):</label>
  <input type=”number” id=”quantity” name=”quantity” min=”1″ max=”5″>
</form>

The multiple Attribute

The input multiple attribute allows the user to enter more than one value in an input field.

This attribute is applicable to the email and file input types.

Example

A file upload field that allows multiple files:

<form>
  <label for=”files”>Select files:</label>
  <input type=”file” id=”files” name=”files” multiple>
</form>