question archive Create an HTML5 Form Page For this assignment you will first read the appropriate chapters in the textbook and then create a new web page, for example called form
Subject:Computer SciencePrice:2.87 Bought7
Create an HTML5 Form Page
For this assignment you will first read the appropriate chapters in the textbook and then create a new web page, for example called form.html
This web page should utilize the following HTML tags and include the following:
You should utilize the new HTML5 form tag features to require the first name, last name, zip code, phone number, and email fields and also use appropriate type="" attributes and pattern="" on the zip code, phone number, and email fields to valildate the syntax of the user entered data.
Answer:
<form action="mailto:xyz@yoursite.com? subject=your-subject-line" method="post" enctype="text/plain">
<p>
<label>Form</label><br>
</p>
<p>
<label>First name</label><br>
<input type="text" name="first_name">
</p>
<p>
<label>Last name</label><br>
<input type="text" name="last_name">
</p>
<p>
<label>Email</label><br>
<input type="email" id="email" name="email"
pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$">
</p>
<p>
<label>Phone number</label><br>
<input type="tel" name="phone">
</p>
<p>
<label>Postal Code</label><br>
<input type="text"
placeholder=""
name="onlynumbers"
pattern="\d{1,7}"
maxlength="7">
</p>
<p>
<label>Country</label><br>
<select>
<option>China</option>
<option>India</option>
<option>United States</option>
<option>Indonesia</option>
<option>Brazil</option>
</select>
</p>
<p>
<label>Address</label><br>
<input type="text" name="address">
</p>
<p>
<label>City</label><br>
<input type="text" name="city">
</p>
<p>
<button>Ok Send My Data</button>
</p>
</form>