Web Development and Design Foundations with HTML5 (8th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
8th Edition
ISBN: 9780134322759
Author: Terry Felke-Morris
Publisher: PEARSON
Question
Book Icon
Chapter 14, Problem 6HOE
Program Plan Intro

Program Plan:

  • Include the HTML tag using “<html>”.
    • Include the heading tag using “<head>”.
      • Open the title tag using “<title>” with appropriate title and close the tag.
      • Set the “meta” tag using “<meta>”.
      • Open the style tag “<style>” to make style for HTML tags.
        • Make a style for “input” type.
          • Set the display as “block”.
          • Set the “margin-bottom” as “1em”.
        • Make a style for “label” element and set the properties of label.
        • Make a style for “submit” element with margin-left property.
    • Open the script tag using “<script>”.
      • Define the function named “validateForm()” to validate the user name, age and city.
        • Check the condition for user name, if user name is “Null” then display the alert message and return “false”.
        • Check the condition for age. If user’s age is less than 18 display the alert message and return “false”.
        • Check the condition for city input. If the input box for city is “Null” then display the alert message “City field cannot be empty” and return “false”.
      • Display the alert message for valid inputs and return “true”.
    • Close the script tag using “</script>”.
    • Close the head tag using “</head>”.
    • Open the heading tag with appropriate heading using “<h1>” tag and close it.
    • Open the form tag with “post” method, when the “onsubmit” event handler clicks by the user the “validateForm()” function called to validate the inputs.
    • Create the additional label and input type for “City” input.
    • Close the form tag using “</form>”.
    • Close the body tag using “</body>”.
  • Close the file using “</html>” tag.

Blurred answer
Students have asked these similar questions
Can we obtain a more in-depth explanation of the HTML post and get methods somewhere? If that's the case, why not?
do the follwing to the code : 1) Document  class.2) Provide a tester class and test a scenario in which you create a comboLock having the code (25, 36, 19), unlockit successfully, and print the status of the lock after each turn.3) Put the ComboLock class and the tester class in two distinct packages   code : public class ComboLock {    private final int key1;    private final int key2;    private final int key3;    private int status;    private int current;    public ComboLock(int s1, int s2, int s3)     {        key1 = s1;        key2 = s2;        key3 = s3;        current = 0;        status = 0;    }    public void reset()     {        status = 0;        current = 0;        System.out.println("Lock is reset. ");    }    public void turnLeft(int ticks)     {        current = current - ticks;        if (current < 0)         {            current = 39-current;        }        System.out.println("Left ticks = [" + ticks + "] and current = " + current);        if (status == 1…
Sorry, this is the full picture(with option 3 and 4) Is the correct answer still be 2?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage