Question

1. Provide code to create a selection list named orderDay containing the values and option text...

1. Provide code to create a selection list named orderDay containing the values and option text SAT and SUN placed in the Weekend option group, and the option text MON, TUE, WED, THU, and FRI placed in the Weekday option group.
2. Provide code to create two radio buttons for the compType field with the values PC and Mac. Make PC the default value.

3. Kelsey has written the following code to create a data field for users to select a food type using radio buttons. What mistake did she make in her coding?

< input name="French" value="Fr" type="radio" />

< input name="Italian" value="It" type="radio" />

< input name="Chinese" value="Ch" type="radio" />

4. Provide code to enter the value of a data field named compType using a check box. Set the value of the Computer field to “yes” if the check box is checked. Associate the check box with the label text “I use a PC.”.

5. Provide code to create a text area box for the memoMsg field. Add the placeholder text, “Enter your memo message” to the text area box.

6. Provide a style rule for the input box with ID userAccount that changes the background color to pink when the input box has the focus and is invalid.

7. Provide a style rule for the input box with ID userAccount that changes the background color to the value rgb(211, 255, 211) when the input box has the focus and is valid.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Question 1 :

Here a new web page with name "Question1.html" is created, which contains following code.

Question1.html :

<!DOCTYPE html>

<html lang="en">

<head>

<!--title for web page -->

<title>Question 1</title>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

</head>

<body>

<!--selection list -->

<select name="orderDay">

<optgroup label="Weekday">Weekday</optgroup>

<option value="MON">MON</option>

<option value="TUE">TUE</option>

<option value="WED">WED</option>

<option value="THU">THU</option>

<option value="FRI">FRI</option>

<optgroup label="Weekend">Weekend</optgroup>

<option value="SAT">SAT</option>

<option value="SUN">SUN</option>

</select>

</body>

</html>

======================================================

Output :Open web page in the browser and will get the screen as shown below.

Screen 1 :Question1.html

*********************************

Question 2 :

Here a new web page with name "Question2.html" is created, which contains following code.

Question2.html :

<!DOCTYPE html>

<html lang="en">

<head>

<!--title for web page -->

<title>Question 2</title>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

</head>

<body>

<!--radio buttons -->

<input type="radio" name="compType" value="PC" checked/>PC

<input type="radio" name="compType" value="Mac"/>Mac

</body>

</html>

======================================================

Output :Open web page in the browser and will get the screen as shown below.

Screen 1 :Question2.html

*******************************************

Question 3 :

Answer :Correct code

<input name="foodType" value="Fr" type="radio" />French

<input name="foodType" value="It" type="radio" />Italian

<input name="foodType" value="Ch" type="radio" />Chinese

Errors :

  • To select a single radio button use same name to three radio buttons.
  • For each radio button need to be associated with text using above code.

Output :

*********************************

Question 4 :

Code :

<input type="checkbox" name="compType" value="yes"/>

<label>I use a PC</label>

Output :

*********************************

Question 5 :

<input type="text" name="memoMsg" placeholder="Enter your memo message"/>

Output :

======================================================

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
1. Provide code to create a selection list named orderDay containing the values and option text...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT