Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
9th Edition
ISBN: 9780134801148
Author: Terry Felke-Morris
Publisher: PEARSON
Question
Book Icon
Chapter 14, Problem 2WR
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.
        • Make a style for “h2” with background-color 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>”.
    • Include the body tag using “<body>”.
      • Open the heading tag with appropriate heading using “<h1>” tag and close it.
      • Descript the purpose of form validation in the paragraph tag “<p>”.
      • Include the unordered list using “<ul>” tag.
        • Create the list of URL of the websites in the list tag “<li>” with anchor tag “<a>”.
        • Close each list with anchor tag using “</li>”.
      • Close the unordered list “</ul>”.
      • Open the form tag with “post” method, when the “onsubmit” event handler clicks by the user the “validateForm()” function called to validate the inputs.
      • Include the inputs using “<input>” tag and label using “<label>” tag.
      • Close the form tag using “</form>”.
      • Include the anchor tag for the email link using “<a>”.
    • Close the body tag using “</body>”.
  • Close the file using “</html>” tag.

Blurred answer
Students have asked these similar questions
Using HTML Create a web page that will prompt the user for a name and age, and write a message using the name and age in the message. Use the prompt() method and variables to accomplish this.
design a search form about the coffee shop: you can specify the type of coffee and the price also the cold or hot type, and make it responsive, by using HTML and CSS, javascript (optional).
Is it possible to create a user comment section like on YouTube using only HTML?
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L